Правка целей для документирования

This commit is contained in:
Andrei Astafev 2019-10-05 16:39:54 +03:00
parent 29669a2b12
commit f630318d67
2 changed files with 6 additions and 5 deletions

View File

@ -31,6 +31,7 @@ function(add_breathe_target)
set(GENERATE_XML YES) set(GENERATE_XML YES)
set(GENERATE_HTML NO) set(GENERATE_HTML NO)
set(GENERATE_LATEX NO) set(GENERATE_LATEX NO)
set(OUTPUT_DIRECTORY ${_BREATHE_HTML_DIR})
configure_file(${_BREATHE_CONF_FILE} ${_BREATHE_BUILD_DIR}/conf.py @ONLY) configure_file(${_BREATHE_CONF_FILE} ${_BREATHE_BUILD_DIR}/conf.py @ONLY)
configure_file(${_BREATHE_DOXY_FILE} ${_BREATHE_BUILD_DIR}/Doxyfile @ONLY) configure_file(${_BREATHE_DOXY_FILE} ${_BREATHE_BUILD_DIR}/Doxyfile @ONLY)

View File

@ -12,7 +12,7 @@ endif()
function(add_doxygen_target) function(add_doxygen_target)
if (DOXYGEN_FOUND) if (DOXYGEN_FOUND)
set(options) set(options)
set(oneValueArgs TARGET_NAME IN OUT LATEX HTML) set(oneValueArgs TARGET_NAME DOXY_FILE OUTPUT_DIRECTORY LATEX HTML)
set(multiValueArgs) set(multiValueArgs)
cmake_parse_arguments(_DOXYGEN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) cmake_parse_arguments(_DOXYGEN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@ -26,16 +26,16 @@ function(add_doxygen_target)
set(GENERATE_LATEX YES) set(GENERATE_LATEX YES)
endif() endif()
configure_file(${_DOXYGEN_IN} ${_DOXYGEN_OUT} @ONLY) configure_file(${_DOXYGEN_DOXY_FILE} ${_DOXYGEN_OUTPUT_DIRECTORY}/Doxyfile @ONLY)
message("Doxygen build started") message("Doxygen build started")
add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} COMMAND ${DOXYGEN_EXECUTABLE} ${_DOXYGEN_OUTPUT_DIRECTORY}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${_DOXYGEN_OUTPUT_DIRECTORY}
COMMENT "Generating API documentation with Doxygen" COMMENT "Generating API documentation with Doxygen"
VERBATIM) VERBATIM)
else() else()
add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM
COMMENT "Doxygen is not found. Skipping target ${_BREATHE_TARGET_NAME} build") COMMENT "Doxygen is not found. Skipping target ${_DOXYGEN_TARGET_NAME} build")
endif() endif()
endfunction() endfunction()