summaryrefslogtreecommitdiff
path: root/doc/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2014-09-26 16:59:24 -0400
committerAllen Winter <allen.winter@kdab.com>2014-09-26 16:59:24 -0400
commit56181886c92a19657eb68bf9f7123eecb95bf8b0 (patch)
tree3d62d2d7771577aea9c2b00eae72531348cd87df /doc/CMakeLists.txt
parent30200162af6608634e03cde8ce12db3b448c40a2 (diff)
downloadlibical-git-56181886c92a19657eb68bf9f7123eecb95bf8b0.tar.gz
first attempt at generating api documentation using doxygen
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r--doc/CMakeLists.txt44
1 files changed, 43 insertions, 1 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 0b7b3433..9cbf8cc6 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,3 +1,45 @@
+#
+# API docs
+#
+macro(_join_list _var _sep)
+ set(${_var} "")
+ foreach(_element ${ARGN})
+ set(${_var} "${${_var}}${_sep}${_element}")
+ endforeach()
+endmacro()
-########### install files ###############
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+ file(GLOB _dox_deps *.dox *.html)
+ file(GLOB _all_hdrs
+ ${CMAKE_SOURCE_DIR}/src/libical/*.h
+ ${CMAKE_SOURCE_DIR}/src/libical/*.c
+ ${CMAKE_BINARY_DIR}/src/libical/*.h
+ ${CMAKE_SOURCE_DIR}/src/libicalss/*.h
+ ${CMAKE_SOURCE_DIR}/src/libicalss/*.c
+ ${CMAKE_BINARY_DIR}/src/libicalss/*.h
+ ${CMAKE_SOURCE_DIR}/src/libicalvcal/*.h
+ ${CMAKE_SOURCE_DIR}/src/libicalvcal/*.c
+ ${CMAKE_BINARY_DIR}/src/libicalvcal/*.h
+ )
+ list(APPEND _all_hdrs ${_dox_deps})
+ _join_list(DOXYGEN_INPUT " " ${_all_hdrs})
+
+ #apidox generation using doxygen
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ )
+
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/apidocs/html/index.html
+ COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ DEPENDS ${_all_hdrs} ${_dox_deps} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ )
+ add_custom_target(docs
+ DEPENDS ${CMAKE_BINARY_DIR}/apidocs/html/index.html
+ )
+
+endif()