From 59d79aef097d13a4dd5d231d2f066ffae70ba31d Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 3 Nov 2011 14:31:33 +0000 Subject: QPID-3464: Build Improvements (CMake) [inspired by Jan-Marek Glogowski] - Fix cmake build to only require actually needed boost libraries git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1197144 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index bb46f1258b..62dce23a42 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -281,13 +281,14 @@ endif (NOT ENABLE_WARNINGS) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}") # Expand a bit from the basic Find_Boost; be specific about what's needed. -# 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) +if (CMAKE_SYSTEM_NAME STREQUAL Windows) + set (Boost_components filesystem program_options date_time thread unit_test_framework regex) +else (CMAKE_SYSTEM_NAME STREQUAL Windows) + set (Boost_components filesystem program_options unit_test_framework) +endif (CMAKE_SYSTEM_NAME STREQUAL Windows) + +find_package(Boost 1.33 REQUIRED COMPONENTS ${Boost_components}) if(NOT Boost_FOUND) message(FATAL_ERROR "Boost C++ libraries not found. Please install or try setting BOOST_ROOT") endif(NOT Boost_FOUND) -- cgit v1.2.1