summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2011-11-03 14:31:33 +0000
committerAndrew Stitcher <astitcher@apache.org>2011-11-03 14:31:33 +0000
commit59d79aef097d13a4dd5d231d2f066ffae70ba31d (patch)
tree63bf30f9ae53c44e3bb9350bdeb210f60b7287cf
parentd85b0609ec886d408b6581663a9b3ac0596ba254 (diff)
downloadqpid-python-59d79aef097d13a4dd5d231d2f066ffae70ba31d.tar.gz
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
-rw-r--r--qpid/cpp/src/CMakeLists.txt13
1 files 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)