summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2012-07-16 23:12:22 -0400
committerAlan Antonuk <alan.antonuk@gmail.com>2013-08-13 16:40:48 -0700
commit8554733a88a19b19637be4b03b0e570e6dc75be9 (patch)
treecc0d5efdd950f0ec4924ceb1257f44b8011f106d /CMakeLists.txt
parent8efc95955770989b3d09c011bc3e311f84787f1d (diff)
downloadrabbitmq-c-github-ask-8554733a88a19b19637be4b03b0e570e6dc75be9.tar.gz
Document public API
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fd39a9..78fc94f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -201,6 +201,7 @@ endif (REGENERATE_AMQP_FRAMING)
find_package(POPT)
find_package(XmlTo)
+find_package(Doxygen)
if (POPT_FOUND AND XmlTo_FOUND)
set(DO_DOCS ON)
@@ -215,6 +216,7 @@ option(BUILD_EXAMPLES "Build Examples" ON)
option(BUILD_TOOLS "Build Tools (requires POPT Library)" ${POPT_FOUND})
option(BUILD_TOOLS_DOCS "Build man pages for Tools (requires xmlto)" ${DO_DOCS})
option(BUILD_TESTS "Build tests (run tests with make test)" ON)
+option(BUILD_API_DOCS "Build Doxygen API docs" ${DOXYGEN_FOUND})
option(ENABLE_SSL_SUPPORT "Enable SSL support" ON)
option(ENABLE_THREAD_SAFETY "Enable thread safety when using OpenSSL" ${Threads_FOUND})
@@ -266,6 +268,22 @@ if (BUILD_TESTS)
add_subdirectory(tests)
endif (BUILD_TESTS)
+if (BUILD_API_DOCS)
+ if (NOT DOXYGEN_FOUND)
+ message(FATAL_ERROR "Doxygen is required to build the API documentation")
+ endif ()
+ configure_file(${CMAKE_SOURCE_DIR}/docs/Doxyfile.in ${CMAKE_BINARY_DIR}/docs/Doxyfile @ONLY)
+
+ add_custom_target(docs
+ COMMAND ${DOXYGEN_EXECUTABLE}
+ VERBATIM
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/docs
+ DEPENDS rabbitmq
+ COMMENT "Generating API documentation"
+ SOURCES ${CMAKE_SOURCE_DIR}/docs/Doxyfile.in
+ )
+endif ()
+
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)