From 11b2185bb43448e8ae78efab7a2d0157d246b4ec Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Mon, 8 Jul 2024 08:54:49 +0800 Subject: [PATCH] chore: update documentation build script --- doc/CMakeLists.txt | 12 ++++++++++++ script/build.bat | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 476902f..2c6c1a4 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -4,3 +4,15 @@ configure_file( ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY ) + +# Add custom target +add_custom_target (YYCCDocumentation + doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating documentation" VERBATIM +) + +# Install built documentation +install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html + DESTINATION doc +) diff --git a/script/build.bat b/script/build.bat index e7b1545..59cc1e0 100644 --- a/script/build.bat +++ b/script/build.bat @@ -36,8 +36,8 @@ CD .. :: Build for documentation CD documentation cmake -DYYCC_BUILD_DOC=ON ../.. -cmake --build . --config Release -:: cmake --install . --prefix=../install --config Release +cmake --build . --target YYCCDocumentation +cmake --install . --prefix=../install CD .. ECHO DONE