From a66973a94f41bc034d98d39028e13cbbff805b93 Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Tue, 15 Dec 2009 17:40:07 +0000 Subject: Fix the check for boost system; prev one broke Windows config. Instead of trying to find_library, run the Find_Boost again for just the system component when needed. Resolving QPID-2202. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@890900 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index 8de4e01e6e..b7d96ba273 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -166,10 +166,11 @@ endif(NOT Boost_FOUND) # Boost.system was introduced at Boost 1.35; it's needed secondarily by other # Boost libs Qpid needs, so be sure it's there. if (NOT Boost_VERSION LESS 103500) - find_library(Boost_SYSTEM_LIBRARY boost_system ${Boost_LIBRARY_DIRS}) + find_package(Boost COMPONENTS system) if (NOT Boost_SYSTEM_LIBRARY) - message(FATAL_ERROR "Boost.system library not found. Please install or try setting BOOST_ROOT") + set(Boost_SYSTEM_LIBRARY boost_system) endif (NOT Boost_SYSTEM_LIBRARY) + endif (NOT Boost_VERSION LESS 103500) # Versions of cmake pre 2.6 don't set the Boost_*_LIBRARY variables correctly -- cgit v1.2.1