debian/changelog: release package version 0.1.5-2
[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 ${DOC_OUTPUT_PATH}
9     COMMENT "Generating API documentation with Doxygen" VERBATIM
10   )
11
12   add_custom_target(install-doc
13     COMMAND ${CMAKE_COMMAND} -DCOMPONENT=doc -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
14     COMMENT "Installing API documentation")
15   add_dependencies(install-doc doc)
16
17   install(CODE "execute_process(COMMAND ${CMAKE_BUILD_TOOL} doc)")
18
19   install(DIRECTORY ${DOC_OUTPUT_PATH}/html
20     DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}"
21     COMPONENT doc)
22
23 endif(DOXYGEN_FOUND)
24
25 add_subdirectory(man)