Created
June 24, 2020 22:15
-
-
Save smrfeld/4938ebcbe49cf3671de2fd7257da75b7 to your computer and use it in GitHub Desktop.
CMake Doxygen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Doxygen | |
# look for Doxygen package | |
find_package(Doxygen) | |
if (DOXYGEN_FOUND) | |
# set input and output files | |
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/docs_doxygen/Doxyfile.in) | |
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.out) | |
# request to configure the file | |
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) | |
message("Doxygen build started") | |
# Note: do not put "ALL" - this builds docs together with application EVERY TIME! | |
add_custom_target( docs | |
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} | |
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | |
COMMENT "Generating API documentation with Doxygen" | |
VERBATIM ) | |
else (DOXYGEN_FOUND) | |
message("Doxygen need to be installed to generate the doxygen documentation") | |
endif (DOXYGEN_FOUND) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!