]> Creatis software - cpPlugins.git/blob - docs/CMakeLists.txt
Moved to version 1.0
[cpPlugins.git] / docs / CMakeLists.txt
1 ## =========================================================================
2 ## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 ## =========================================================================
4
5 option(cpPlugins_BUILD_DOC "Build documentation?" OFF)
6 if(cpPlugins_BUILD_DOC)
7
8   ## == Doxygen and DOT?
9   find_package(Doxygen)
10   if(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
11
12     ## == Configure files
13     set(_dox_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
14     set(_dox_out ${PROJECT_BINARY_DIR}/Doxyfile)
15     configure_file(${_dox_in} ${_dox_out} @ONLY)
16
17     # == Execute doxygen
18     add_custom_target(
19       documentation ALL
20       COMMAND ${DOXYGEN_EXECUTABLE} ${_dox_out}
21       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
22       COMMENT "Generating documentation with Doxygen"
23       VERBATIM
24       )
25   else(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
26     message(
27       STATUS
28       "*** Doxygen and Graphviz/Dot neede to build documentation ***"
29       )
30   endif(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
31 endif(cpPlugins_BUILD_DOC)
32
33 ## eof - $RCSfile$