This commit is contained in:
Hongze Cheng 2021-11-09 16:02:48 +08:00
parent 6568f7ba78
commit da3598f783
2 changed files with 10 additions and 3 deletions

View File

@ -76,8 +76,15 @@ add_subdirectory(source)
# docs
if(${BUILD_DOCS})
execute_process(COMMAND doxygen ${PROJECT_SOURCE_DIR}/docs/Doxyfile)
find_program(DOC_GENERATOR doxygen)
if(NOT DOC_GENERATOR)
message("doxygen is not found, skip doc build")
else()
execute_process(
COMMAND doxygen ${CMAKE_SOURCE_DIR}/docs/Doxyfile
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endif(NOT DOC_GENERATOR)
endif(${BUILD_DOCS})
# tests (TODO)

View File

@ -40,5 +40,5 @@ option(
option(
BUILD_DOCS
"If use doxygen build documents"
OFF
ON
)