From 5db186e8da4bbde45dcf462abde40498ab765d71 Mon Sep 17 00:00:00 2001 From: Travis Hunter Date: Fri, 15 Mar 2024 10:50:00 -0600 Subject: [PATCH] Fixed build on Fedora with boost. I'm not sure why it worked on FreeBSD but in Fedora 39 CMake didn't set boost up properly, or maybe the FetchContent(Boost) just never worked and it always found the installed boost library? But it fetches and sets up dynamically now... --- CMakeLists.txt | 5 +++-- utils/CMakeLists.txt | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 122da0c..dec1a0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,11 +54,12 @@ FetchContent_Declare(eigen FetchContent_MakeAvailable(eigen) # boost dependency + FetchContent_Declare(Boost GIT_REPOSITORY https://github.com/boostorg/boost - GIT_TAG boost-1.82.0) + GIT_TAG boost-1.84.0) +set(BOOST_INCLUDE_LIBRARIES property_tree) FetchContent_MakeAvailable(Boost) - # Add qtrocket subdirectories. These are components that will be linked in diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index b3a1765..251b567 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -19,10 +19,12 @@ add_library(utils math/UtilityMathFunctions.h) -target_include_directories(utils PRIVATE - ${Boost_INCLUDE_DIR}) +#target_include_directories(utils PRIVATE +# ${Boost_INCLUDE_DIRS}) + target_link_libraries(utils PUBLIC libcurl + Boost::property_tree jsoncpp_static eigen)