[1.5] revert build documentation behaviour in cmake
[openjpeg.git] / doc / CMakeLists.txt
1 # Generate target to build the html documentation through CMake tool
2 # After having configured the project with the BUILD_DOC option you can run make doc
3 # to generate the html documentation in the doc/html repository of the build folder.
4
5 # Try to find the doxygen tool
6 FIND_PACKAGE(Doxygen)
7
8 IF(DOXYGEN_FOUND)
9   # Configure the doxygen config file with variable from CMake and move it
10   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.dox.cmake.in
11     ${CMAKE_BINARY_DIR}/doc/Doxyfile-html.dox @ONLY)
12   
13   # Generate new target to build the html documentation
14   ADD_CUSTOM_TARGET(doc ALL
15     ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/doc/Doxyfile-html.dox)
16
17 ELSE(DOXYGEN_FOUND)
18
19   MESSAGE(STATUS "Doxygen not found, we cannot generate the documentation")
20
21 ENDIF(DOXYGEN_FOUND)