mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-10 20:10:05 +00:00
Fix building with CMake 3.30 in old setups
This commit is contained in:
parent
8f80007a4e
commit
20d664a8b7
@ -754,8 +754,18 @@ set(BOOST_COMPONENTS atomic chrono date_time serialization system thread)
|
||||
if(NOT ${FILESYSTEM_FOUND})
|
||||
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} filesystem)
|
||||
endif()
|
||||
find_package(Boost ${GNSSSDR_BOOST_MIN_VERSION} COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.30)
|
||||
find_package(Boost ${GNSSSDR_BOOST_MIN_VERSION} COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
else()
|
||||
find_package(Boost ${GNSSSDR_BOOST_MIN_VERSION} COMPONENTS ${BOOST_COMPONENTS})
|
||||
if(NOT Boost_FOUND)
|
||||
message(STATUS "Trying deprecated FindBoost Module ...")
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 OLD)
|
||||
find_package(Boost ${GNSSSDR_BOOST_MIN_VERSION} REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(NOT Boost_FOUND)
|
||||
message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.")
|
||||
endif()
|
||||
|
@ -19,11 +19,19 @@ if(NOT GNSSTK_FOUND OR ENABLE_OWN_GNSSTK)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.30.0")
|
||||
if(CMAKE_VERSION VERSION_LESS 3.30)
|
||||
find_package(Boost COMPONENTS iostreams serialization QUIET)
|
||||
else()
|
||||
find_package(Boost COMPONENTS iostreams serialization)
|
||||
if(NOT TARGET Boost::iostreams)
|
||||
message(STATUS "Trying deprecated FindBoost Module ...")
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 OLD)
|
||||
find_package(Boost COMPONENTS iostreams serialization)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.5)
|
||||
if(NOT TARGET Boost::iostreams)
|
||||
add_library(Boost::iostreams IMPORTED SHARED)
|
||||
|
Loading…
Reference in New Issue
Block a user