X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=docs%2FCMakeLists.txt;fp=docs%2FCMakeLists.txt;h=ea336d600cb597c264896d141c899c274bd84e1f;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=0000000000000000000000000000000000000000;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 0000000..ea336d6 --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,33 @@ +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +option(cpPlugins_BUILD_DOC "Build documentation?" OFF) +if(cpPlugins_BUILD_DOC) + + ## == Doxygen and DOT? + find_package(Doxygen) + if(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) + + ## == Configure files + set(_dox_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) + set(_dox_out ${PROJECT_BINARY_DIR}/Doxyfile) + configure_file(${_dox_in} ${_dox_out} @ONLY) + + # == Execute doxygen + add_custom_target( + documentation ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${_dox_out} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating documentation with Doxygen" + VERBATIM + ) + else(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) + message( + STATUS + "*** Doxygen and Graphviz/Dot neede to build documentation ***" + ) + endif(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) +endif(cpPlugins_BUILD_DOC) + +## eof - $RCSfile$