Функция для сборки документации с помощью Doxygen

This commit is contained in:
Andrei Astafev 2019-08-17 06:04:04 +03:00
parent 21595e3890
commit d759666a01
2 changed files with 25 additions and 0 deletions

View File

@ -39,6 +39,7 @@ include(CMLibSanitizers)
include(cotire) include(cotire)
include(CMLibFormatSources) include(CMLibFormatSources)
include(CMLibDoxygen)
include(CMLibBreathe) include(CMLibBreathe)
include(CMLibQtTranslation) include(CMLibQtTranslation)
include(CMLibToday) include(CMLibToday)

24
CMLibDoxygen.cmake Normal file
View File

@ -0,0 +1,24 @@
option(BUILD_DOXYGEN_DOC "Build documentation with Doxygen" OFF)
set_property(CACHE BUILD_DOXYGEN_DOC PROPERTY STRINGS ON OFF)
function(add_doxygen_target)
if (BUILD_DOXYGEN_DOC)
find_package(Doxygen REQUIRED)
set(options)
set(oneValueArgs TARGET_NAME IN OUT)
set(multiValueArgs)
cmake_parse_arguments(_DOXYGEN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
configure_file(${_DOXYGEN_IN} ${_DOXYGEN_OUT} @ONLY)
message("Doxygen build started")
add_custom_target(${_DOXYGEN_TARGET}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
endif()
endfunction()