Правила для сборки документации
This commit is contained in:
parent
0a2d9a4fce
commit
156d74f581
@ -37,13 +37,11 @@ endif()
|
||||
function(add_breathe_target)
|
||||
set(options)
|
||||
set(oneValueArgs
|
||||
TARGET_NAME
|
||||
SOURCE_DIR
|
||||
BUILD_DIR
|
||||
CACHE_DIR
|
||||
HTML_DIR
|
||||
DOXY_FILE
|
||||
CONF_FILE
|
||||
TARGET_NAME
|
||||
OUTPUT_DIR
|
||||
COMMENT)
|
||||
set(multiValueArgs)
|
||||
|
||||
@ -53,14 +51,15 @@ function(add_breathe_target)
|
||||
"${multiValueArgs}"
|
||||
${ARGN})
|
||||
if(BREATHE_FOUND)
|
||||
set(BREATHE_DOCS_BUILD_DIR ${_BREATHE_BUILD_DIR})
|
||||
set(WORK_DIR ${CMAKE_BINARY_DIR}/_breathe)
|
||||
set(BREATHE_DOCS_BUILD_DIR ${WORK_DIR})
|
||||
set(GENERATE_XML YES)
|
||||
set(GENERATE_HTML NO)
|
||||
set(GENERATE_LATEX NO)
|
||||
set(OUTPUT_DIRECTORY ${_BREATHE_HTML_DIR})
|
||||
set(OUTPUT_DIRECTORY ${WORK_DIR})
|
||||
|
||||
configure_file(${_BREATHE_CONF_FILE} ${_BREATHE_BUILD_DIR}/conf.py @ONLY)
|
||||
configure_file(${_BREATHE_DOXY_FILE} ${_BREATHE_BUILD_DIR}/Doxyfile @ONLY)
|
||||
configure_file(${_BREATHE_CONF_FILE} ${WORK_DIR}/conf.py @ONLY)
|
||||
configure_file(${_BREATHE_DOXY_FILE} ${WORK_DIR}/Doxyfile @ONLY)
|
||||
|
||||
add_custom_target(${_BREATHE_TARGET_NAME} VERBATIM
|
||||
COMMAND ${SPHINX_EXECUTABLE}
|
||||
@ -68,11 +67,11 @@ function(add_breathe_target)
|
||||
-b
|
||||
html
|
||||
-c
|
||||
${_BREATHE_BUILD_DIR}
|
||||
${WORK_DIR}
|
||||
-d
|
||||
${_BREATHE_CACHE_DIR}
|
||||
${WORK_DIR}/cache
|
||||
${_BREATHE_SOURCE_DIR}
|
||||
${_BREATHE_HTML_DIR}
|
||||
${_BREATHE_OUTPUT_DIR}
|
||||
COMMENT "Building ${_BREATHE_TARGET_NAME} documentation with Breathe")
|
||||
else()
|
||||
add_custom_target(${_BREATHE_TARGET_NAME} VERBATIM
|
||||
|
@ -16,8 +16,9 @@ function(add_doxygen_target)
|
||||
set(options)
|
||||
set(oneValueArgs
|
||||
TARGET_NAME
|
||||
SOURCE_DIR
|
||||
DOXY_FILE
|
||||
OUTPUT_DIRECTORY
|
||||
OUTPUT_DIR
|
||||
LATEX
|
||||
HTML)
|
||||
set(multiValueArgs)
|
||||
@ -31,6 +32,8 @@ function(add_doxygen_target)
|
||||
set(GENERATE_XML NO)
|
||||
set(GENERATE_HTML NO)
|
||||
set(GENERATE_LATEX NO)
|
||||
set(OUTPUT_DIRECTORY ${_DOXYGEN_OUTPUT_DIR})
|
||||
set(SOURCE_DIR ${_DOXYGEN_SOURCE_DIR})
|
||||
if(_DOXYGEN_HTML)
|
||||
set(GENERATE_HTML YES)
|
||||
endif()
|
||||
@ -38,12 +41,12 @@ function(add_doxygen_target)
|
||||
set(GENERATE_LATEX YES)
|
||||
endif()
|
||||
|
||||
configure_file(${_DOXYGEN_DOXY_FILE} ${_DOXYGEN_OUTPUT_DIRECTORY}/Doxyfile @ONLY)
|
||||
message("Doxygen build started")
|
||||
set(WORK_DIR ${CMAKE_BINARY_DIR}/_doxygen)
|
||||
configure_file(${_DOXYGEN_DOXY_FILE} ${WORK_DIR}/Doxyfile @ONLY)
|
||||
|
||||
add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${_DOXYGEN_OUTPUT_DIRECTORY}/Doxyfile
|
||||
WORKING_DIRECTORY ${_DOXYGEN_OUTPUT_DIRECTORY}
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${WORK_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${WORK_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen")
|
||||
else()
|
||||
add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM
|
||||
|
Loading…
Reference in New Issue
Block a user