Skip to content
Snippets Groups Projects
Commit 1b35e537 authored by Lars Bilke's avatar Lars Bilke
Browse files

[cmake] Fix for system-installed boost.

parent 9812ed82
No related branches found
No related tags found
No related merge requests found
......@@ -190,20 +190,21 @@ if(OGS_USE_MFRONT)
endif()
endif()
# Boost libraries used by ogs, can be linked with Boost::[lib_name]
set(BOOST_INCLUDE_LIBRARIES
math
property_tree
algorithm
smart_ptr
tokenizer
assign
dynamic_bitset
range
variant
)
if(GUIX_BUILD)
find_package(Boost REQUIRED)
else()
# Boost libraries used by ogs, can be linked with Boost::[lib_name]
set(BOOST_INCLUDE_LIBRARIES
math
property_tree
algorithm
smart_ptr
tokenizer
assign
dynamic_bitset
range
)
CPMFindPackage(
NAME Boost
VERSION ${ogs.minimum_version.boost}
......@@ -211,6 +212,13 @@ else()
OPTIONS "BOOST_ENABLE_CMAKE ON"
)
endif()
if(NOT Boost_ADDED)
# Boost from system found. There are only Boost::headers and Boost::boost
# targets.
foreach(lib ${BOOST_INCLUDE_LIBRARIES})
add_library(Boost::${lib} ALIAS Boost::headers)
endforeach()
endif()
CPMFindPackage(
NAME LibXml2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment