aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-02-22 15:19:57 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-02-22 15:19:57 +0100
commite5b99b359cebd2145a891932686bb9cdab751809 (patch)
treed352c39a21f35eb3afd26aa24b41d6f0beb557c1
parent229193ab96536aa5045e7d1678cab032433599ac (diff)
downloadble-toys-e5b99b359cebd2145a891932686bb9cdab751809.tar.gz
ble-toys-e5b99b359cebd2145a891932686bb9cdab751809.tar.bz2
ble-toys-e5b99b359cebd2145a891932686bb9cdab751809.tar.xz
ble-toys-e5b99b359cebd2145a891932686bb9cdab751809.zip
o Doxygen setup.
-rw-r--r--CMakeLists.txt20
-rw-r--r--Doxyfile.in7
2 files changed, 27 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b9fbfc..0cf3b20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,26 @@ set(Boost_USE_STATIC_RUNTIME OFF)
add_definitions(-DBOOST_ALL_DYN_LINK)
+find_package(Doxygen)
+if (DOXYGEN_FOUND)
+ set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
+ set(doxyfile ${PROJECT_BINARY_DIR}/Doxyfile)
+ set(doxy_html_index_file ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
+
+ configure_file(
+ ${doxyfile_in}
+ ${doxyfile} @ONLY)
+
+ add_custom_command(
+ OUTPUT ${doxy_html_index_file}
+ COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
+ MAIN_DEPENDENCY ${doxyfile} ${doxyfile_in}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "Generating documentation" VERBATIM)
+
+ add_custom_target(doc DEPENDS ${doxy_html_index_file} )
+endif(DOXYGEN_FOUND)
+
add_subdirectory(ble)
add_subdirectory(apps)
add_subdirectory(test)
diff --git a/Doxyfile.in b/Doxyfile.in
new file mode 100644
index 0000000..31c26cf
--- /dev/null
+++ b/Doxyfile.in
@@ -0,0 +1,7 @@
+INPUT = @CMAKE_CURRENT_SOURCE_DIR@/ble
+
+PROJECT_NAME = "@CMAKE_PROJECT_NAME@"
+STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ \
+ @PROJECT_BINARY_DIR@
+
+# OUTPUT_DIRECTORY=@CMAKE_CURRENT_BINARY_DIR@