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 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3