diff options
author | Alan Conway <aconway@apache.org> | 2009-12-10 18:40:37 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-12-10 18:40:37 +0000 |
commit | ea80bee0d468ffab3dfec89ffcd171ad54fdd3c4 (patch) | |
tree | 796e95cd19653a69a2cfeb381569718e4e6241b6 | |
parent | eabca97cb1b2116665b61554d61fc6ca20a15c42 (diff) | |
download | qpid-python-ea80bee0d468ffab3dfec89ffcd171ad54fdd3c4.tar.gz |
QPID-2236: cmake link error, missing boost.system library.
Tested on boost-1.37.0-7.fc11.x86_64 which has the system library and
boost-1.33.1-10.el5 which does not.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@889358 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/CMakeLists.txt | 10 | ||||
-rw-r--r-- | qpid/cpp/src/cluster.cmake | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/cluster.cmake | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index 49ebe1e31e..c1666487f2 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -157,7 +157,7 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}") # (which itself uses regex). find_package(Boost 1.33 REQUIRED COMPONENTS filesystem program_options date_time thread - regex unit_test_framework) + regex unit_test_framework system) if(NOT Boost_FOUND) message(FATAL_ERROR "Boost C++ libraries not found. Please install or try setting BOOST_ROOT") endif(NOT Boost_FOUND) @@ -180,6 +180,14 @@ if (NOT Boost_REGEX_LIBRARY) set(Boost_REGEX_LIBRARY boost_regex) 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) +endif (NOT Boost_SYSTEM_LIBRARY) + # The Windows install also wants the Boost DLLs and headers that the release # is built with. The DLLs enable everything to run, and the headers ensure # that users building Qpid C++ client programs can compile (the C++ API diff --git a/qpid/cpp/src/cluster.cmake b/qpid/cpp/src/cluster.cmake index 910d75e768..2c7b108e71 100644 --- a/qpid/cpp/src/cluster.cmake +++ b/qpid/cpp/src/cluster.cmake @@ -133,7 +133,7 @@ if (BUILD_CLUSTER) ) add_library (cluster MODULE ${cluster_SOURCES}) - target_link_libraries (cluster ${LIBCPG} ${CMAN_LIB} qpidbroker qpidclient ${Boost_FILESYSTEM_LIBRARY}) + target_link_libraries (cluster ${LIBCPG} ${CMAN_LIB} qpidbroker qpidclient ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}) set_target_properties (cluster PROPERTIES PREFIX "") # Create a second shared library for linking with test executables, diff --git a/qpid/cpp/src/tests/cluster.cmake b/qpid/cpp/src/tests/cluster.cmake index cc7d154e7d..9084bfb85b 100644 --- a/qpid/cpp/src/tests/cluster.cmake +++ b/qpid/cpp/src/tests/cluster.cmake @@ -35,7 +35,7 @@ set (cluster_test_SOURCES InitialStatusMap StoreStatus ) -add_executable (cluster_test cluster_test ${cluster_test_SOURCES} ${platform_test_additions}) +add_executable (cluster_test ${cluster_test_SOURCES} ${platform_test_additions}) target_link_libraries (cluster_test ${qpid_test_boost_libs} qpidclient qpidbroker cluster_shared) remember_location(cluster_test) |