Функция для сборки документации с помощью Doxygen
This commit is contained in:
parent
21595e3890
commit
d759666a01
@ -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
24
CMLibDoxygen.cmake
Normal 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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user