diff --git a/.gitignore b/.gitignore index c2180cd1507164b45f412d955102682391753335..d7d4599d47adc998a0d92afd718804f56edbfb3b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,3 @@ build/ cmake-build-debug/ cmake-build-release/ - -doc/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 820fea55ea1a9f7e57c235231f181a4438487e75..cfe411c374e3d794ce3c1ee9cea162aed86e7cc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,3 +57,5 @@ target_include_directories(vkcv SYSTEM BEFORE PRIVATE ${vkcv_includes}) target_link_libraries(vkcv ${vkcv_libraries}) add_subdirectory(projects) + +include(${vkcv_config}/ext/Doxygen.cmake) diff --git a/config/ext/Doxygen.cmake b/config/ext/Doxygen.cmake new file mode 100644 index 0000000000000000000000000000000000000000..b711ac4b24777642fc3202be8909ac405b84d92b --- /dev/null +++ b/config/ext/Doxygen.cmake @@ -0,0 +1,14 @@ + +# check if Doxygen is installed +find_package(Doxygen) + +if (DOXYGEN_FOUND) + # note the option ALL which allows to build the docs together with the application + add_custom_target( doc_doxygen ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Doxyfile + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + COMMENT "Generating API documentation with Doxygen" + VERBATIM ) +else (DOXYGEN_FOUND) + message(WARNING "Doxygen need to be installed to generate the doxygen documentation") +endif (DOXYGEN_FOUND) diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..6789717874108c574c1ad246d3ecea8250340814 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,2 @@ +html/ +latex/