summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2021-05-21 05:51:45 +0000
committerAlan Antonuk <alan.antonuk@gmail.com>2021-05-20 23:14:47 -0700
commit883ddc06267e39b24fd5ac504a3485de685aef09 (patch)
tree8d112778b6cc1eb5dedc9fd4216d20e05e4a34a2 /CMakeLists.txt
parentd0bdca934d8acb203ff276ae2014a358451642ef (diff)
downloadrabbitmq-c-883ddc06267e39b24fd5ac504a3485de685aef09.tar.gz
cmake: only enable doxygen when configured to
Also use find_package(... REQUIRED) pattern to be a bit more concise. Signed-off-by: GitHub <noreply@github.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 2 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 826c15a..50a152a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,8 +119,6 @@ if (ENABLE_SSL_SUPPORT)
cmake_pop_check_state()
endif()
-find_package(Doxygen)
-
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest)
endif()
@@ -133,7 +131,7 @@ option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" ON)
option(BUILD_EXAMPLES "Build Examples" OFF)
option(BUILD_TOOLS "Build Tools (requires POPT Library)" OFF)
cmake_dependent_option(BUILD_TOOLS_DOCS "Build man pages for tools (requires xmlto)" OFF "BUILD_TOOLS" OFF)
-option(BUILD_API_DOCS "Build Doxygen API docs" ${DOXYGEN_FOUND})
+option(BUILD_API_DOCS "Build Doxygen API docs" OFF)
option(RUN_SYSTEM_TESTS "Run system tests (i.e. tests requiring an accessible RabbitMQ server instance on localhost)" OFF)
if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
@@ -169,9 +167,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
endif ()
if (BUILD_API_DOCS)
- if (NOT DOXYGEN_FOUND)
- message(FATAL_ERROR "Doxygen is required to build the API documentation")
- endif ()
+ find_package(Doxygen REQUIRED)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/docs/Doxyfile @ONLY)
add_custom_target(docs