diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-05-13 10:22:54 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-05-13 10:22:54 +0800 |
commit | f5ab6e11f13699c03a696611f67f8384434130a1 (patch) | |
tree | d82a47eec16982302ae74db3a84d0c5aaa0dc481 /indra/cmake/Boost.cmake | |
parent | abb32860d2a6e49e10d3ab243a62154d67f802b2 (diff) |
Not rely on (LL_)USESYSTEMLIBS macro & CMake setting
but the fact that we keep on using as many system libraries as we
can (and only resort to other sources in certain cases), hasn't
changed, of course.
Also stop having to set USE_AUTOBUILD_3P to OFF.
Lines are reindented, and when a system library can be found for
a dependency, then that should be the way. If later we find out
that using some other way is better, than stick to that. So, one
option at a time, whichever is best for the situation.
GLEXT hasn't been used, and in order to be not having to hack its
.cmake file, we bypass it and refer to GLH (which is still used)
right away in LLWindow.
CMake commands that need to be bypassed, if it's a one-liner then
it's just commented out, but if it's multiple lines, then scope
them with if (FALSE) to minimise difference.
Diffstat (limited to 'indra/cmake/Boost.cmake')
-rw-r--r-- | indra/cmake/Boost.cmake | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index c9688d0fe0..ba2eaccf63 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -4,34 +4,35 @@ include(Prebuilt) include_guard() add_library( ll::boost INTERFACE IMPORTED ) + +if (DARWIN) + set(sfx -mt) + target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.87/include) + target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.87/lib) +elseif (WINDOWS) + set(sfx -mt) + target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/x86_64-w64-mingw32/include) + target_link_directories( ll::boost INTERFACE /opt/local/x86_64-w64-mingw32/lib) +else () + find_package( Boost REQUIRED ) +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} + boost_url${sfx} + ) +target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) +return() + 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 ) - if (WINDOWS) - set(sfx -mt) - target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/x86_64-w64-mingw32/include) - target_link_directories( ll::boost INTERFACE /opt/local/x86_64-w64-mingw32/lib) - elseif (DARWIN) - set(sfx -mt) - target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.87/include) - target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.87/lib) - else (WINDOWS) - find_package( Boost REQUIRED ) - endif (WINDOWS) - 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} - boost_url${sfx} - ) - target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) - return() endif() use_prebuilt_binary(boost) |