summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-07-11 13:16:45 +0800
committerErik Kundiman <erik@megapahit.org>2023-07-19 10:44:59 +0800
commit7943a9e01ae970eaa39cabccda68501e47340688 (patch)
tree37cfc988a7ebb68550d585565bf0712bf0a36785 /indra
parent066f6d400b7438575075f785ca8e93e435dc4029 (diff)
Obtain Boost include dir when using system libs
The necessary linker flags to link the required Boost libraries are somehow not obtained from find_package. Passing boost_context, boost_fiber, or so on to find_package didn't help getting the linker flags either. Hence the manual listing of the Boost libraries to link.
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/Boost.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 601a23a86d..0c5abd885c 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -8,6 +8,21 @@ if( USE_CONAN )
target_link_libraries( ll::boost INTERFACE CONAN_PKG::boost )
target_compile_definitions( ll::boost INTERFACE BOOST_ALLOW_DEPRECATED_HEADERS BOOST_BIND_GLOBAL_PLACEHOLDERS )
return()
+elseif( NOT USE_AUTOBUILD_3P )
+ find_package( Boost REQUIRED )
+ target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS )
+ if (DARWIN)
+ set(sfx "-mt")
+ endif()
+ target_link_libraries( ll::boost INTERFACE
+ boost_context${sfx}
+ boost_fiber${sfx}
+ boost_filesystem${sfx}
+ boost_program_options${sfx}
+ boost_regex${sfx}
+ boost_system${sfx}
+ boost_thread${sfx})
+ return()
endif()
use_prebuilt_binary(boost)