aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
-rw-r--r--Doxyfile.in17
2 files changed, 26 insertions, 0 deletions
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)
diff --git a/Doxyfile.in b/Doxyfile.in
new file mode 100644
index 0000000..9211df1
--- /dev/null
+++ b/Doxyfile.in
@@ -0,0 +1,17 @@
+# For better readability, the documentation and default settings are removed
+# from this file. For more information on the Doxygen configuration, generate
+# a new Doxyfile using `doxygen -g` or have a look at the Doxygen manual at
+# http://www.doxygen.nl/manual/config.html
+#
+# This file is processed by CMake. To generate the documentation, run `make
+# doc` in the build directory.
+
+PROJECT_NAME = "@CMAKE_PROJECT_NAME@"
+PROJECT_NUMBER = "@PROJECT_VERSION@"
+PROJECT_BRIEF =
+OUTPUT_DIRECTORY = doc
+STRIP_FROM_PATH = @CMAKE_CURRENT_SOURCE_DIR@
+JAVADOC_AUTOBRIEF = YES
+OPTIMIZE_OUTPUT_FOR_C = YES
+WARN_NO_PARAMDOC = YES
+INPUT = @CMAKE_CURRENT_SOURCE_DIR@/NK_C_API.h