From e5b99b359cebd2145a891932686bb9cdab751809 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 22 Feb 2015 15:19:57 +0100 Subject: o Doxygen setup. --- CMakeLists.txt | 20 ++++++++++++++++++++ Doxyfile.in | 7 +++++++ 2 files changed, 27 insertions(+) create mode 100644 Doxyfile.in 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@ -- cgit v1.2.3