X-Git-Url: https://git.ao2.it/libam7xxx.git/blobdiff_plain/3bc2d7cac242b47443795ddef34c48bc9d359780..d702d586c9ad8ed07563b1e7d35d136c0afa84b2:/doc/man/CMakeLists.txt diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt index 8029513..ed46999 100644 --- a/doc/man/CMakeLists.txt +++ b/doc/man/CMakeLists.txt @@ -2,15 +2,23 @@ find_package(Asciidoc) if(ASCIIDOC_FOUND) add_custom_target(manpages - ${ASCIIDOC_A2X_EXECUTABLE} -f manpage ${CMAKE_CURRENT_SOURCE_DIR}/am7xxx-play.1.txt -D ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${ASCIIDOC_A2X_EXECUTABLE} -f manpage ${CMAKE_CURRENT_SOURCE_DIR}/picoproj.1.txt -D ${CMAKE_CURRENT_BINARY_DIR} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ${ASCIIDOC_A2X_EXECUTABLE} -f manpage ${CMAKE_CURRENT_SOURCE_DIR}/am7xxx-play.1.txt -D ${DOC_OUTPUT_PATH}/man + COMMAND ${ASCIIDOC_A2X_EXECUTABLE} -f manpage ${CMAKE_CURRENT_SOURCE_DIR}/picoproj.1.txt -D ${DOC_OUTPUT_PATH}/man + WORKING_DIRECTORY ${DOC_OUTPUT_PATH}/man COMMENT "Generating man pages with Asciidoc" VERBATIM ) -install(FILES - ${DOC_OUTPUT_PATH}/man/am7xxx-play.1 - ${DOC_OUTPUT_PATH}/man/picoproj.1 - DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1/") + add_custom_target(install-manpages + COMMAND ${CMAKE_COMMAND} -DCOMPONENT=manpages -P ${CMAKE_BINARY_DIR}/cmake_install.cmake + COMMENT "Installing manpages") + add_dependencies(install-manpages manpages) + + install(CODE "execute_process(COMMAND ${CMAKE_BUILD_TOOL} manpages)") + + install(FILES + ${DOC_OUTPUT_PATH}/man/am7xxx-play.1 + ${DOC_OUTPUT_PATH}/man/picoproj.1 + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1/" + COMPONENT manpages) endif(ASCIIDOC_FOUND)