X-Git-Url: https://git.ao2.it/libam7xxx.git/blobdiff_plain/7125b5256322f0055f19d2a478236cd69fcf64b3..0a85ed4af0cecf6112eea778d2188dbdf4bed8bc:/doc/CMakeLists.txt?ds=inline diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 0569f9d..6ccf100 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -5,12 +5,20 @@ if(DOXYGEN_FOUND) add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + WORKING_DIRECTORY ${DOC_OUTPUT_PATH} COMMENT "Generating API documentation with Doxygen" VERBATIM ) + add_custom_target(install-doc + COMMAND ${CMAKE_COMMAND} -DCOMPONENT=doc -P ${CMAKE_BINARY_DIR}/cmake_install.cmake + COMMENT "Installing API documentation") + add_dependencies(install-doc doc) + + install(CODE "execute_process(COMMAND ${CMAKE_BUILD_TOOL} doc)") + install(DIRECTORY ${DOC_OUTPUT_PATH}/html - DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}") + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}" + COMPONENT doc) endif(DOXYGEN_FOUND)