summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/CMakeLists.txt18
1 files changed, 12 insertions, 6 deletions
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt
index c1666487f2..b6da2e758d 100644
--- a/cpp/src/CMakeLists.txt
+++ b/cpp/src/CMakeLists.txt
@@ -155,13 +155,23 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}")
# TODO: Not all these libs are needed everywhere:
# Linux only uses filesystem program_options unit_test_framework
# (which itself uses regex).
+# Boost.system is sometimes needed; it's handled separately, below.
find_package(Boost 1.33 REQUIRED
COMPONENTS filesystem program_options date_time thread
- regex unit_test_framework system)
+ regex unit_test_framework)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost C++ libraries not found. Please install or try setting BOOST_ROOT")
endif(NOT Boost_FOUND)
+# Boost.system was introduced at Boost 1.35; it's needed secondarily by other
+# Boost libs Qpid needs, so be sure it's there.
+if (NOT Boost_VERSION LESS 103500)
+ find_library(Boost_SYSTEM_LIBRARY, boost_system ${Boost_LIBRARY_DIRS})
+ if (NOT Boost_SYSTEM_LIBRARY)
+ message(FATAL_ERROR "Boost.system library not found. Please install or try setting BOOST_ROOT")
+ endif (NOT Boost_SYSTEM_LIBRARY)
+endif (NOT Boost_VERSION LESS 103500)
+
# Versions of cmake pre 2.6 don't set the Boost_*_LIBRARY variables correctly
# these values are correct for Linux
if (NOT Boost_PROGRAM_OPTIONS_LIBRARY)
@@ -181,11 +191,7 @@ if (NOT Boost_REGEX_LIBRARY)
endif (NOT Boost_REGEX_LIBRARY)
if (NOT Boost_SYSTEM_LIBRARY)
- # This library is not present in earlier boost versions so check for presence.
- find_library(LIBBOOST_SYSTEM, boost_system ${Boost_LIBRARY_DIRS})
- if (LIBBOOST_SYSTEM)
- set(Boost_SYSTEM_LIBRARY boost_system)
- endif (LIBBOOST_SYSTEM)
+ set(Boost_SYSTEM_LIBRARY boost_system)
endif (NOT Boost_SYSTEM_LIBRARY)
# The Windows install also wants the Boost DLLs and headers that the release