c1995f75f6536a7771478d40f48106e7d517902f
[libam7xxx.git] / doc / CMakeLists.txt
1 # add a target to generate API documentation with Doxygen
2 find_package(Doxygen)
3 if(DOXYGEN_FOUND)
4   configure_file("Doxyfile.in" "Doxyfile" @ONLY IMMEDIATE)
5
6   add_custom_target(doc
7     ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
8     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
9     COMMENT "Generating API documentation with Doxygen" VERBATIM
10   )
11
12   add_custom_target(install-doc
13     ${CMAKE_COMMAND} -E copy_directory
14     ${DOC_OUTPUT_PATH}/html
15     "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}/html"
16   )
17   add_dependencies(install-doc doc)
18
19   install(CODE "execute_process(COMMAND ${CMAKE_BUILD_TOOL} install-doc)")
20
21 endif(DOXYGEN_FOUND)
22
23 add_subdirectory(man)