From c70f3e1aaa47dac3793648edc744580c0af3ae0a Mon Sep 17 00:00:00 2001 From: redcode Date: Sat, 18 Jun 2022 14:20:45 +0200 Subject: [PATCH] CMakeLists.txt --- documentation/CMakeLists.txt | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt index 530df23..3bf9103 100644 --- a/documentation/CMakeLists.txt +++ b/documentation/CMakeLists.txt @@ -30,7 +30,9 @@ add_custom_command( MAIN_DEPENDENCY ${_doxyfile} COMMENT "Extracting API reference") -add_custom_target(API-XML ALL DEPENDS ${_api_xml_output}) +add_custom_target( + ${PROJECT_NAME}-API-XML ALL + DEPENDS ${_api_xml_output}) if(${PROJECT_NAME}_WITH_HTML_DOCUMENTATION) set(_html_documentation_output "${CMAKE_CURRENT_BINARY_DIR}/HTML") @@ -53,8 +55,11 @@ if(${PROJECT_NAME}_WITH_HTML_DOCUMENTATION) WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating documentation in HTML format") - add_custom_target(Documentation-HTML ALL DEPENDS ${_html_documentation_output}) - add_dependencies(Documentation-HTML API-XML) + add_custom_target( + ${PROJECT_NAME}-Documentation-HTML ALL + DEPENDS ${_html_documentation_output}) + + add_dependencies(${PROJECT_NAME}-Documentation-HTML ${PROJECT_NAME}-API-XML) install(DIRECTORY "${_html_documentation_output}/" DESTINATION "${CMAKE_INSTALL_DOCDIR}/documentation" @@ -77,8 +82,11 @@ if(${PROJECT_NAME}_WITH_PDF_DOCUMENTATION) WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating documentation in LaTeX format") - add_custom_target(Documentation-LaTeX ALL DEPENDS ${_latex_documentation_output}) - add_dependencies(Documentation-LaTeX API-XML) + add_custom_target( + ${PROJECT_NAME}-Documentation-LaTeX ALL + DEPENDS ${_latex_documentation_output}) + + add_dependencies(${PROJECT_NAME}-Documentation-LaTeX ${PROJECT_NAME}-API-XML) string(TOLOWER ${PROJECT_NAME} _pdf_documentation_output) set(_pdf_documentation_output "${_latex_documentation_output}/${_pdf_documentation_output}.pdf") @@ -90,8 +98,11 @@ if(${PROJECT_NAME}_WITH_PDF_DOCUMENTATION) WORKING_DIRECTORY ${_latex_documentation_output} COMMENT "Converting documentation to PDF format") - add_custom_target(Documentation-PDF ALL DEPENDS ${_pdf_documentation_output}) - add_dependencies(Documentation-PDF Documentation-LaTeX) + add_custom_target( + ${PROJECT_NAME}-Documentation-PDF ALL + DEPENDS ${_pdf_documentation_output}) + + add_dependencies(${PROJECT_NAME}-Documentation-PDF ${PROJECT_NAME}-Documentation-LaTeX) install(FILES ${_pdf_documentation_output} DESTINATION ${CMAKE_INSTALL_DOCDIR}