1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
Description: Fix compilation with boost 1.89
In the upcoming Boost 1.89.0 release, Boost.System stub has been
removed which causes CMake error:
.
```
CMake Error at /opt/homebrew/lib/cmake/Boost-1.89.0/BoostConfig.cmake:141 (find_package):
Could not find a package configuration file provided by "boost_system"
(requested version 1.89.0) with any of the following names:
.
boost_systemConfig.cmake
boost_system-config.cmake
```
.
This issue is fixed by dropping `system` from the `COMPONENTS` as it's
not needed since 1.69. With this change, boost minimum version to
build SFCGAL is now 1.69.0. This should not be an issue as this
version was released in 2018.
Author: Jean Felder <jean.felder@oslandia.com>
Origin: https://gitlab.com/sfcgal/SFCGAL/-/commit/9b044794ab95758c56a51f51a98adcb3ef874060
Bug: https://gitlab.com/sfcgal/SFCGAL/-/issues/306
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,13 +133,13 @@ else()
message( STATUS "Boost_USE_MULTITHREAD=OFF" )
endif()
-#-- minimalist build allowed with boost version older than 1.48
-set( SFCGAL_Boost_COMPONENTS thread system serialization )
+#-- minimalist build allowed with boost version 1.69 or newer
+set( SFCGAL_Boost_COMPONENTS thread serialization )
#-- program_options
if ( SFCGAL_BUILD_TESTS OR SFCGAL_BUILD_EXAMPLES OR SFCGAL_BUILD_OSG )
set( SFCGAL_Boost_COMPONENTS chrono unit_test_framework filesystem program_options timer ${SFCGAL_Boost_COMPONENTS} )
endif()
-find_package( Boost COMPONENTS ${SFCGAL_Boost_COMPONENTS} REQUIRED )
+find_package( Boost 1.69.0 COMPONENTS ${SFCGAL_Boost_COMPONENTS} REQUIRED )
if((${Boost_MAJOR_VERSION} EQUAL 1) AND (${Boost_MINOR_VERSION} EQUAL 58))
message( STATUS "Defining BOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT" )
add_definitions( "-DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT" )
|