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