diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake index e92aa3f81e7d2571dac6d07701b822e3f1bc027f..d0baf039632ff94b6b09c01ceb1e6996e2fc38e9 100644 --- a/scripts/cmake/Dependencies.cmake +++ b/scripts/cmake/Dependencies.cmake @@ -130,7 +130,13 @@ CPMFindPackage( NAME Boost GITHUB_REPOSITORY Orphis/boost-cmake VERSION ${ogs.minimum_version.boost} + DOWNLOAD_ONLY YES ) +if(Boost_ADDED) + add_library(Boost::boost INTERFACE IMPORTED) + string(REPLACE "." "_" boost_version ${ogs.minimum_version.boost}) + target_include_directories(Boost::boost SYSTEM INTERFACE ${Boost_SOURCE_DIR}/boost/boost_${boost_version}) +endif() if(OGS_USE_XDMF) # ZLIB is a HDF5 dependency