From ef6cdb1aa50cd9bdd0d2c42e971543ae6404a33f Mon Sep 17 00:00:00 2001 From: Mourad Boufarguine Date: Wed, 20 Mar 2013 23:25:11 +0100 Subject: [PATCH] fix Boost modules on Windows --- cmake/pcl_find_boost.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/pcl_find_boost.cmake b/cmake/pcl_find_boost.cmake index 5ed268e7d14..212d2e0e1a4 100644 --- a/cmake/pcl_find_boost.cmake +++ b/cmake/pcl_find_boost.cmake @@ -24,15 +24,16 @@ if(Boost_SERIALIZATION_FOUND) endif(Boost_SERIALIZATION_FOUND) # Required boost modules -find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams) - +set(BOOST_REQUIRED_MODULES system filesystem thread date_time iostreams) # Starting with Boost 1.50, boost_thread depends on chrono. As this is not # taken care of automatically on Windows, we add an explicit dependency as a # workaround. if(WIN32 AND Boost_VERSION VERSION_GREATER "104900") - find_package(Boost 1.40.0 REQUIRED COMPONENTS chrono) + set(BOOST_REQUIRED_MODULES ${BOOST_REQUIRED_MODULES} chrono) endif(WIN32 AND Boost_VERSION VERSION_GREATER "104900") +find_package(Boost 1.40.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES}) + if(Boost_FOUND) set(BOOST_FOUND TRUE) # Obtain diagnostic information about Boost's automatic linking outputted