diff options
Diffstat (limited to 'indra/cmake/Boost.cmake')
| -rw-r--r-- | indra/cmake/Boost.cmake | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 25d673e49a..3f9134cb8f 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -12,10 +12,21 @@ if (DARWIN) elseif (WINDOWS) target_include_directories( ll::boost SYSTEM INTERFACE ${prefix_result}/../include) target_link_directories( ll::boost INTERFACE ${prefix_result}) - if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) - set(sfx -vc143-mt-a64-1_91) + # Detect the actual toolset/version suffix from whatever vcpkg installed. + # Glob for boost_context-*.lib and strip the known prefix to get the suffix. + file(GLOB _boost_context_libs "${prefix_result}/boost_context-*.lib") + if (_boost_context_libs) + list(GET _boost_context_libs 0 _boost_context_lib) + get_filename_component(_boost_context_name "${_boost_context_lib}" NAME_WE) + string(REPLACE "boost_context" "" sfx "${_boost_context_name}") else () - set(sfx -vc143-mt-x64-1_91) + if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + set(sfx -vc143-mt-a64-1_91) + else () + set(sfx -vc143-mt-x64-1_91) + endif () + message(WARNING "Could not detect Boost suffix via glob; using fallback '${sfx}'. " + "Check that vcpkg installed boost into ${prefix_result}.") endif () else () find_package( Boost ) @@ -152,4 +163,3 @@ target_link_libraries(ll::boost INTERFACE if (LINUX) target_link_libraries(ll::boost INTERFACE rt) endif (LINUX) - |
