From 3d46c1f9602bea7e6c6a49db8b6f2421166ef65d Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Thu, 12 Feb 2015 16:51:26 +0300 Subject: [PATCH] Don't install documentation if it isn't built The HAVE_DOC_GENERATOR variable was always true. --- doc/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 0994ab623a..66d2a478a2 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -2,7 +2,11 @@ # CMake file for OpenCV docs #----------------------- -set(HAVE_DOC_GENERATOR BUILD_DOCS AND (HAVE_SPHINX OR HAVE_DOXYGEN)) +if(BUILD_DOCS AND (HAVE_SPHINX OR HAVE_DOXYGEN)) + set(HAVE_DOC_GENERATOR TRUE) +else() + set(HAVE_DOC_GENERATOR FALSE) +endif() if(HAVE_DOC_GENERATOR) project(opencv_docs)