From c30a8b40be7a4500259fe96838150917de443042 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 31 May 2021 20:57:36 +0200 Subject: [PATCH] Older Boost version need log_setup in addition to log. 1.75.0 works without it, 1.74.0 not. Removed -DBOOST_LOG_DYN_LINK again. --- CMakeLists.txt | 3 ++- src/CMakeLists.txt | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26f5dc3..adb9ef2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,8 @@ include(cmake/debug_flags.cmake) # All dependencies except test dependencies. set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) -find_package(Boost 1.65.0 REQUIRED COMPONENTS locale log program_options regex) +find_package(Boost 1.65.0 REQUIRED + COMPONENTS locale log_setup log program_options regex) find_package(Gettext REQUIRED) find_package(Filesystem REQUIRED COMPONENTS Final Experimental) find_package(LibArchive 3.2 REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3bb5866..717340e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,14 +15,11 @@ target_sources(${PROJECT_NAME}_lib unset(sources_src) unset(headers_src) -# Older CMake versions apparently need this, but I don't know in which version -# it changed. Theoretically Boost::dynamic_linking should take care of it. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_LOG_DYN_LINK") - target_link_libraries(${PROJECT_NAME}_lib PUBLIC Boost::dynamic_linking Boost::locale + Boost::log_setup Boost::log Boost::program_options Boost::regex