diff options
Diffstat (limited to 'docs/CMakeLists.txt')
-rw-r--r-- | docs/CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 0000000..50d6625 --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,22 @@ +############################################################ +# Build documentation +############################################################ + +# see https://tty1.net/blog/2014/cmake-doxygen_en.html +find_package(Doxygen) +option(BUILD_DOCS "Create API documentation (requires doxygen)" ${DOXYGEN_FOUND}) + +if(BUILD_DOCS) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + @ONLY) + + add_custom_target(docs + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" + VERBATIM) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc) +endif() |