From acc1de758e3e8baecc4a04125e569a8d0a3cdadf Mon Sep 17 00:00:00 2001
From: Francois Bleibel <fbleibel@gmail.com>
Date: Mon, 21 Jun 2010 16:13:30 +0900
Subject: [PATCH] Only generate documentation if GENERATE_DOC is ON.

---
 CMakeLists.txt | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 733fe5eb..2853967b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,7 +188,10 @@ ADD_SUBDIRECTORY(unitTesting)
 #
 # Documentation produced by doxygen
 #
-INCLUDE(FindDoxygen)
-IF(DOXYGEN_FOUND)
-  add_subdirectory(doc)
-ENDIF(DOXYGEN_FOUND)
+IF(GENERATE_DOC)
+  INCLUDE(FindDoxygen)
+  IF(DOXYGEN_FOUND)
+    MESSAGE(STATUS "Doxygen found")
+    add_subdirectory(doc)
+  ENDIF(DOXYGEN_FOUND)
+ENDIF(GENERATE_DOC)
-- 
GitLab