mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2025-12-01 12:11:20 +00:00
Use Boost's own CMake configuration file instead of CMake's module
Otherwise, breaks builds with newer Boost versions. Also set policy CMP0167 to NEW and forcing CMake to use the Config package and not the built-in module. Will now require Boost 1.70, but this should be available everywhere.
This commit is contained in:
@ -22,7 +22,12 @@ if(NOT ENABLE_BOOST_FILESYSTEM AND STD_FILESYSTEM_EXISTS)
|
||||
set(PROJECTM_FILESYSTEM_INCLUDE <filesystem>)
|
||||
set(PROJECTM_FILESYSTEM_USE_BOOST FALSE)
|
||||
else()
|
||||
find_package(Boost REQUIRED COMPONENTS Filesystem)
|
||||
# Requires Boost 1.70 or higher (which was released back in 2019)
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
endif()
|
||||
|
||||
find_package(Boost CONFIG NO_MODULE REQUIRED COMPONENTS Filesystem)
|
||||
|
||||
set(PROJECTM_FILESYSTEM_NAMESPACE boost)
|
||||
set(PROJECTM_FILESYSTEM_INCLUDE <boost/filesystem.hpp>)
|
||||
|
||||
Reference in New Issue
Block a user