summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlan Antonuk <aega@med.umich.edu>2012-05-22 12:46:53 -0400
committerAlan Antonuk <aega@med.umich.edu>2012-05-24 15:47:10 -0400
commit763961d2cee6b07065c63da3e7595c2febc12388 (patch)
tree00f0d1cfa636ea9cda099f2fdaf0644102047056 /CMakeLists.txt
parent990f932ea4c2aadecf554d7aa59045f862c566ff (diff)
downloadrabbitmq-c-github-ask-763961d2cee6b07065c63da3e7595c2febc12388.tar.gz
Added CMake options to disable building of tools and examples
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa3819a..3246624 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,17 +56,26 @@ mark_as_advanced(AMQP_CODEGEN_DIR)
find_package(POPT)
option(BUILD_SHARED_LIBS "Build rabbitmq-c as a shared library" ON)
+option(BUILD_TOOLS "Build Tools (requires POPT Library)" ${POPT_FOUND})
+option(BUILD_EXAMPLES "Build Examples" ON)
if (WIN32 AND NOT BUILD_SHARED_LIBS)
message(FATAL_ERROR "The rabbitmq-c library cannot be built as a static library on Win32. Set BUILD_SHARED_LIBS=ON to get around this.")
endif()
add_subdirectory(librabbitmq)
-add_subdirectory(examples)
-if (POPT_FOUND)
+if (BUILD_EXAMPLES)
+ add_subdirectory(examples)
+endif ()
+
+if (BUILD_TOOLS)
+ if (POPT_FOUND)
add_subdirectory(tools)
-endif (POPT_FOUND)
+ else ()
+ message(WARNING "POpt library was not found. Tools will not be built")
+ endif ()
+endif ()
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)