From 156d74f581cac0771f3c05411fd0d79f811afc55 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sun, 13 Oct 2019 09:13:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D0=B0=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibDocBreathe.cmake | 21 ++++++++++----------- CMLibDocDoxygen.cmake | 13 ++++++++----- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CMLibDocBreathe.cmake b/CMLibDocBreathe.cmake index 68ad6cc..f20a676 100644 --- a/CMLibDocBreathe.cmake +++ b/CMLibDocBreathe.cmake @@ -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 diff --git a/CMLibDocDoxygen.cmake b/CMLibDocDoxygen.cmake index acb2b02..a04be27 100644 --- a/CMLibDocDoxygen.cmake +++ b/CMLibDocDoxygen.cmake @@ -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