--- a/doc/CMakeLists.txt Thu May 07 18:48:38 2009 +0300
+++ b/doc/CMakeLists.txt Thu May 07 22:23:51 2009 +0300
@@ -1,32 +1,31 @@
# We need Doxygen
find_package (Doxygen)
-# set our .dox path
-set (PROJECT_DOX_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.dox")
+# path to the project's .dox file to include
+set (DOXYGEN_DOX_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.dox")
-# where to install doxygen output, as (html|latex|...) subdirs
-set (PROJECT_DOXYGEN_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+# path to store doxygen output in, as html/latext subdirs
+set (DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+# path to generated doxygen .conf file
+set (DOXYGEN_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf")
+
+# only set up doxygen if needed
if (DOXYGEN_FOUND)
- # doxygen.conf.in -> doxygen.conf
+ # build the doxygen config file
configure_file (
- ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf.in
- ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf
+ "${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf.in"
+ ${DOXYGEN_CONFIG}
@ONLY
)
-
- # set doxygen config path
- set (DOXYGEN_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf")
-
- # add custom doc target
+
+ # add custom 'doc' target
add_custom_target (doc
${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG}
)
- message (STATUS "Doxygen: output will be written to ${PROJECT_DOXYGEN_DIR}")
-
else (DOXYGEN_FOUND)
- message (STATUS "Doxygen: not found :(")
+ message (STATUS "Doxygen: not found")
endif (DOXYGEN_FOUND)