From 9e7d99dfbbe41e4b97f8d8728fe44cdcc7a0ad28 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sat, 29 Jan 2011 17:36:27 +0100 Subject: cmake: added doc target which invokes doxygen --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3808ec5..dc0f022 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,17 @@ set(CMAKE_C_FLAGS "-Wall -pedantic -g -std=c99 -D_POSIX_SOURCE") set(CURSES_NEED_NCURSES true) find_package(Curses) +find_package(Doxygen) +if(DOXYGEN_FOUND) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) + add_custom_target(doc + ${DOXYGEN_EXECUTABLE} + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" VERBATIM + ) +endif(DOXYGEN_FOUND) + # Set the directory where source files are located. set(OXEN_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src) @@ -29,3 +40,4 @@ target_link_libraries( oxen ${CURSES_LIBRARIES} ) + -- cgit v1.2.3