summaryrefslogtreecommitdiff
path: root/cpp/src
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
commitc32b143f8cfd196a8f85e40c7000e7c0921766a9 (patch)
tree47a8fa28179371fb7f447ab75f32768fe1393ada /cpp/src
parent83c98d5f1ea00f9458baf195ce4c1685378ba113 (diff)
downloadqpid-python-c32b143f8cfd196a8f85e40c7000e7c0921766a9.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/qpid@1197144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/CMakeLists.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt
index bb46f1258b..62dce23a42 100644
--- a/cpp/src/CMakeLists.txt
+++ b/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)