diff --git a/CMLibDocBreathe.cmake b/CMLibDocBreathe.cmake index 991d2ec..75b90f1 100644 --- a/CMLibDocBreathe.cmake +++ b/CMLibDocBreathe.cmake @@ -21,12 +21,12 @@ endif() function(add_breathe_target) - if(BREATHE_FOUND) - set(options) - set(oneValueArgs SOURCE_DIR BUILD_DIR CACHE_DIR HTML_DIR DOXY_FILE CONF_FILE TARGET_NAME COMMENT) - set(multiValueArgs) + set(options) + set(oneValueArgs SOURCE_DIR BUILD_DIR CACHE_DIR HTML_DIR DOXY_FILE CONF_FILE TARGET_NAME COMMENT) + set(multiValueArgs) - cmake_parse_arguments(_BREATHE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + cmake_parse_arguments(_BREATHE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + if(BREATHE_FOUND) set(BREATHE_DOCS_BUILD_DIR ${_BREATHE_BUILD_DIR}) set(GENERATE_XML YES) set(GENERATE_HTML NO) diff --git a/CMLibDocDoxygen.cmake b/CMLibDocDoxygen.cmake index e9e56cf..0cc5d3b 100644 --- a/CMLibDocDoxygen.cmake +++ b/CMLibDocDoxygen.cmake @@ -10,12 +10,12 @@ endif() function(add_doxygen_target) - if (DOXYGEN_FOUND) - set(options) - set(oneValueArgs TARGET_NAME DOXY_FILE OUTPUT_DIRECTORY LATEX HTML) - set(multiValueArgs) + set(options) + set(oneValueArgs TARGET_NAME DOXY_FILE OUTPUT_DIRECTORY LATEX HTML) + set(multiValueArgs) - cmake_parse_arguments(_DOXYGEN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + cmake_parse_arguments(_DOXYGEN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + if (DOXYGEN_FOUND) set(GENERATE_XML NO) set(GENERATE_HTML NO) set(GENERATE_LATEX NO) @@ -32,8 +32,7 @@ function(add_doxygen_target) add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM COMMAND ${DOXYGEN_EXECUTABLE} ${_DOXYGEN_OUTPUT_DIRECTORY}/Doxyfile WORKING_DIRECTORY ${_DOXYGEN_OUTPUT_DIRECTORY} - COMMENT "Generating API documentation with Doxygen" - VERBATIM) + COMMENT "Generating API documentation with Doxygen") else() add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM COMMENT "Doxygen is not found. Skipping target ${_DOXYGEN_TARGET_NAME} build")