From 88af332d0bafe17bbba77d6b2544dbb704530b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 2 Sep 2009 12:27:55 +0000 Subject: [PATCH] Only add doc targets if doxygen is found git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@196 fdac6126-5c0c-442c-9429-916003d36597 --- Doc/CMakeLists.txt | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/Doc/CMakeLists.txt b/Doc/CMakeLists.txt index bd7c5312..521c6f79 100644 --- a/Doc/CMakeLists.txt +++ b/Doc/CMakeLists.txt @@ -1,15 +1,19 @@ -include (ACGDoxygen) - -if (TARGET doc) - acg_copy_after_build (doc "${CMAKE_CURRENT_SOURCE_DIR}/html" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html") -endif () - -# Add a documentation install target -add_custom_target(doc-install COMMENT "Installing Documentation" VERBATIM ) - -# Build Documentation before installing it -add_dependencies(doc-install doc) - -if (TARGET doc-install) - acg_copy_after_build (doc-install "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html" "${CMAKE_INSTALL_PREFIX}/${ACG_PROJECT_DATADIR}/doc/html") -endif() +include (ACGDoxygen) + +IF (DOXYGEN_FOUND) + + if (TARGET doc) + acg_copy_after_build (doc "${CMAKE_CURRENT_SOURCE_DIR}/html" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html") + endif () + + # Add a documentation install target + add_custom_target(doc-install COMMENT "Installing Documentation" VERBATIM ) + + # Build Documentation before installing it + add_dependencies(doc-install doc) + + if (TARGET doc-install) + acg_copy_after_build (doc-install "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html" "${CMAKE_INSTALL_PREFIX}/${ACG_PROJECT_DATADIR}/doc/html") + endif() + +ENDIF(DOXYGEN_FOUND) \ No newline at end of file