summaryrefslogtreecommitdiff
path: root/indra/cmake/Boost.cmake
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-11-22 23:11:29 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-11-22 23:12:05 +0200
commitde0317cc3f5f42ccf51a7bbfdd04e8b16d51e811 (patch)
tree36b368602ac3aa1bdf9df97a0fb65c92767f457f /indra/cmake/Boost.cmake
parentdaa1257466ee3cf000e2c94ef05259577ea513b4 (diff)
parent395a60a83e954e9bcbb44dc6f1a49319b2d628b7 (diff)
Merge branch 'DRTVWR-568' into DRTVWR-539
Diffstat (limited to 'indra/cmake/Boost.cmake')
-rw-r--r--indra/cmake/Boost.cmake135
1 files changed, 40 insertions, 95 deletions
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index e79dc33245..601a23a86d 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -1,105 +1,50 @@
# -*- cmake -*-
include(Prebuilt)
-set(Boost_FIND_QUIETLY ON)
-set(Boost_FIND_REQUIRED ON)
+include_guard()
-if (USESYSTEMLIBS)
- include(FindBoost)
+add_library( ll::boost INTERFACE IMPORTED )
+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()
+endif()
- set(BOOST_CONTEXT_LIBRARY boost_context-mt)
- set(BOOST_FIBER_LIBRARY boost_fiber-mt)
- set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
- set(BOOST_REGEX_LIBRARY boost_regex-mt)
- set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
- set(BOOST_SYSTEM_LIBRARY boost_system-mt)
- set(BOOST_THREAD_LIBRARY boost_thread-mt)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(boost)
- set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+use_prebuilt_binary(boost)
- # As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed
- # with the address size.
- set(addrsfx "-x${ADDRESS_SIZE}")
+# As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed
+# with the address size.
+set(addrsfx "-x${ADDRESS_SIZE}")
- if (WINDOWS)
- set(BOOST_CONTEXT_LIBRARY
- optimized libboost_context-mt${addrsfx}
- debug libboost_context-mt${addrsfx}-gd)
- set(BOOST_FIBER_LIBRARY
- optimized libboost_fiber-mt${addrsfx}
- debug libboost_fiber-mt${addrsfx}-gd)
- set(BOOST_FILESYSTEM_LIBRARY
- optimized libboost_filesystem-mt${addrsfx}
- debug libboost_filesystem-mt${addrsfx}-gd)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized libboost_program_options-mt${addrsfx}
- debug libboost_program_options-mt${addrsfx}-gd)
- set(BOOST_REGEX_LIBRARY
- optimized libboost_regex-mt${addrsfx}
- debug libboost_regex-mt${addrsfx}-gd)
- set(BOOST_SIGNALS_LIBRARY
- optimized libboost_signals-mt${addrsfx}
- debug libboost_signals-mt${addrsfx}-gd)
- set(BOOST_SYSTEM_LIBRARY
- optimized libboost_system-mt${addrsfx}
- debug libboost_system-mt${addrsfx}-gd)
- set(BOOST_THREAD_LIBRARY
- optimized libboost_thread-mt${addrsfx}
- debug libboost_thread-mt${addrsfx}-gd)
- elseif (LINUX)
- set(BOOST_CONTEXT_LIBRARY
- optimized boost_context-mt${addrsfx}
- debug boost_context-mt${addrsfx}-d)
- set(BOOST_FIBER_LIBRARY
- optimized boost_fiber-mt${addrsfx}
- debug boost_fiber-mt${addrsfx}-d)
- set(BOOST_FILESYSTEM_LIBRARY
- optimized boost_filesystem-mt${addrsfx}
- debug boost_filesystem-mt${addrsfx}-d)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized boost_program_options-mt${addrsfx}
- debug boost_program_options-mt${addrsfx}-d)
- set(BOOST_REGEX_LIBRARY
- optimized boost_regex-mt${addrsfx}
- debug boost_regex-mt${addrsfx}-d)
- set(BOOST_SIGNALS_LIBRARY
- optimized boost_signals-mt${addrsfx}
- debug boost_signals-mt${addrsfx}-d)
- set(BOOST_SYSTEM_LIBRARY
- optimized boost_system-mt${addrsfx}
- debug boost_system-mt${addrsfx}-d)
- set(BOOST_THREAD_LIBRARY
- optimized boost_thread-mt${addrsfx}
- debug boost_thread-mt${addrsfx}-d)
- elseif (DARWIN)
- set(BOOST_CONTEXT_LIBRARY
- optimized boost_context-mt${addrsfx}
- debug boost_context-mt${addrsfx})
- set(BOOST_FIBER_LIBRARY
- optimized boost_fiber-mt${addrsfx}
- debug boost_fiber-mt${addrsfx})
- set(BOOST_FILESYSTEM_LIBRARY
- optimized boost_filesystem-mt${addrsfx}
- debug boost_filesystem-mt${addrsfx})
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized boost_program_options-mt${addrsfx}
- debug boost_program_options-mt${addrsfx})
- set(BOOST_REGEX_LIBRARY
- optimized boost_regex-mt${addrsfx}
- debug boost_regex-mt${addrsfx})
- set(BOOST_SIGNALS_LIBRARY
- optimized boost_signals-mt${addrsfx}
- debug boost_signals-mt${addrsfx})
- set(BOOST_SYSTEM_LIBRARY
- optimized boost_system-mt${addrsfx}
- debug boost_system-mt${addrsfx})
- set(BOOST_THREAD_LIBRARY
- optimized boost_thread-mt${addrsfx}
- debug boost_thread-mt${addrsfx})
- endif (WINDOWS)
-endif (USESYSTEMLIBS)
+if (WINDOWS)
+ target_link_libraries( ll::boost INTERFACE
+ libboost_context-mt${addrsfx}
+ libboost_fiber-mt${addrsfx}
+ libboost_filesystem-mt${addrsfx}
+ libboost_program_options-mt${addrsfx}
+ libboost_regex-mt${addrsfx}
+ libboost_system-mt${addrsfx}
+ libboost_thread-mt${addrsfx})
+elseif (LINUX)
+ target_link_libraries( ll::boost INTERFACE
+ boost_context-mt${addrsfx}
+ boost_fiber-mt${addrsfx}
+ boost_filesystem-mt${addrsfx}
+ boost_program_options-mt${addrsfx}
+ boost_regex-mt${addrsfx}
+ boost_signals-mt${addrsfx}
+ boost_system-mt${addrsfx}
+ boost_thread-mt${addrsfx})
+elseif (DARWIN)
+ target_link_libraries( ll::boost INTERFACE
+ boost_context-mt${addrsfx}
+ boost_fiber-mt${addrsfx}
+ boost_filesystem-mt${addrsfx}
+ boost_program_options-mt${addrsfx}
+ boost_regex-mt${addrsfx}
+ boost_system-mt${addrsfx}
+ boost_thread-mt${addrsfx})
+endif (WINDOWS)
if (LINUX)
set(BOOST_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIBRARY} rt)