[trunk] Remove CMake-language block-end command arguments
[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   # Configure the html mainpage file of the doxygen documentation with variable
14   # from CMake and move it
15   configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mainpage.dox.cmake
16     ${CMAKE_BINARY_DIR}/doc/mainpage.dox @ONLY)
17
18   # Generate new target to build the html documentation
19   add_custom_target(doc ALL
20     ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/doc/Doxyfile-html.dox)
21
22 else()
23
24   message(STATUS "Doxygen not found, we cannot generate the documentation")
25
26 endif()