From 2a4f2df2244018f525d23805f9fbdfa3f21b4570 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Wed, 16 Jan 2019 19:17:17 +0100 Subject: Add a doc target that generates C API documentation Doxygen is used generate the C API documentation. The Doxygen configuration is stored in the Doxygen.in file (that is processed by CMake). To generate the documentation, run make doc in the build directory. --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1004baf..f7d98a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,3 +233,12 @@ set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set (CPACK_PACKAGE_VERSION "${PROJECT_VERSION}") include (CPack) + +# Build Doxygen documentation for the C API +find_package(Doxygen) +if (DOXYGEN_FOUND) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) + add_custom_target(doc ${DOXYGEN_EXECUTABLE} Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating C API documentation with Doxygen" VERBATIM) +endif(DOXYGEN_FOUND) -- cgit v1.2.1