summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-08-20 14:53:08 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2019-08-20 14:53:08 +0000
commita824dc2de24ac3789207a5fb9d89400bc83891f9 (patch)
treeda5fde85363c580b44332d6be3813c9b5b14bb99 /docs
parentb2cfff1cd378b9e822c7cfa53fc0dd94d2e9103f (diff)
parent73aaa91ceac51a96973965827ebc2fbb23d6c234 (diff)
Merge "docs: add docs target for generating doxygen output"
Diffstat (limited to 'docs')
-rw-r--r--docs/CMakeLists.txt22
-rw-r--r--docs/Doxyfile.in11
2 files changed, 33 insertions, 0 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
new file mode 100644
index 0000000..2346aff
--- /dev/null
+++ b/docs/CMakeLists.txt
@@ -0,0 +1,22 @@
+# add a target to generate API documentation with Doxygen
+find_package(Doxygen)
+option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" ${DOXYGEN_FOUND})
+
+if(BUILD_DOCUMENTATION)
+ if(NOT DOXYGEN_FOUND)
+ message(FATAL_ERROR "Doxygen is needed to build the documentation.")
+ endif()
+
+ set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
+ set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+ configure_file(${doxyfile_in} ${doxyfile} @ONLY)
+
+ add_custom_target(docs
+ COMMAND ${DOXYGEN_EXECUTABLE} ${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()
diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in
new file mode 100644
index 0000000..cdfe6e7
--- /dev/null
+++ b/docs/Doxyfile.in
@@ -0,0 +1,11 @@
+PROJECT_NAME = "@CMAKE_PROJECT_NAME@"
+PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ \
+ @PROJECT_BINARY_DIR@
+INPUT = @doxy_main_page@ \
+ @PROJECT_SOURCE_DIR@ \
+ @PROJECT_BINARY_DIR@
+EXCLUDE = @PROJECT_SOURCE_DIR@/qtappfw_autogen
+FILE_PATTERNS = *.h *.cpp
+RECURSIVE = YES
+USE_MDFILE_AS_MAINPAGE = @doxy_main_page@