Author: astitcher
Date: Thu Nov  3 14:31:33 2011
New Revision: 1197144

URL: http://svn.apache.org/viewvc?rev=1197144&view=rev
Log:
QPID-3464: Build Improvements (CMake) [inspired by Jan-Marek Glogowski]
- Fix cmake build to only require actually needed boost libraries

Modified:
    qpid/trunk/qpid/cpp/src/CMakeLists.txt

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1197144&r1=1197143&r2=1197144&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Thu Nov  3 14:31:33 2011
@@ -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)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscr...@qpid.apache.org

Reply via email to