summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/00-Common.cmake9
-rw-r--r--indra/cmake/APR.cmake14
-rw-r--r--indra/cmake/Audio.cmake19
-rw-r--r--indra/cmake/Boost.cmake9
-rw-r--r--indra/cmake/CMakeLists.txt2
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake42
-rw-r--r--indra/cmake/EXPAT.cmake19
-rw-r--r--indra/cmake/Hunspell.cmake13
-rw-r--r--indra/cmake/JPEG.cmake10
-rw-r--r--indra/cmake/LLCommon.cmake2
-rw-r--r--indra/cmake/LLPrimitive.cmake4
-rw-r--r--indra/cmake/URIPARSER.cmake19
-rw-r--r--indra/cmake/XmlRpcEpi.cmake11
13 files changed, 85 insertions, 88 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 07deaa56b0..f1fa7761c3 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -32,6 +32,10 @@ add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE})
# -- which we do. Without one or the other, we get a ton of Boost warnings.
add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS)
+# Force enable SSE2 instructions in GLM per the manual
+# https://github.com/g-truc/glm/blob/master/manual.md#section2_10
+add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_FORCE_SSE2=1)
+
# Configure crash reporting
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
@@ -104,11 +108,6 @@ if (WINDOWS)
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
- # workaround for github runner image breakage:
- # https://github.com/actions/runner-images/issues/10004#issuecomment-2153445161
- # can be removed after the above issue is resolved and deployed across GHA
- add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
-
# Allow use of sprintf etc
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif (WINDOWS)
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index 21139319c3..97b316c4c7 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -18,6 +18,7 @@ if (WINDOWS)
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
)
+ target_compile_definitions( ll::apr INTERFACE APR_DECLARE_STATIC=1 APU_DECLARE_STATIC=1 API_DECLARE_STATIC=1)
elseif (DARWIN)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "0.dylib")
@@ -28,16 +29,15 @@ elseif (DARWIN)
endif (LLCOMMON_LINK_SHARED)
target_link_libraries( ll::apr INTERFACE
- libapr-1.${APR_selector}
- libaprutil-1.${APRUTIL_selector}
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.${APR_selector}
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.${APR_selector}
iconv
)
-else (WINDOWS)
+else()
target_link_libraries( ll::apr INTERFACE
- apr-1
- aprutil-1
- uuid
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a
rt
)
-endif (WINDOWS)
+endif ()
target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 )
diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake
index 38547bb017..8c82749cab 100644
--- a/indra/cmake/Audio.cmake
+++ b/indra/cmake/Audio.cmake
@@ -1,4 +1,5 @@
# -*- cmake -*-
+include(Linking)
include(Prebuilt)
include_guard()
@@ -9,8 +10,22 @@ use_prebuilt_binary(ogg_vorbis)
target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
if (WINDOWS)
- target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static )
+ target_link_libraries(ll::vorbis INTERFACE
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.lib
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libogg.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.lib
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisenc.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.lib
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisfile.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.lib
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbis.lib
+ )
else (WINDOWS)
- target_link_libraries(ll::vorbis INTERFACE ogg vorbis vorbisenc vorbisfile )
+ target_link_libraries(ll::vorbis INTERFACE
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.a
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.a
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.a
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.a
+ )
endif (WINDOWS)
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 601a23a86d..8c5b946753 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -24,7 +24,8 @@ if (WINDOWS)
libboost_program_options-mt${addrsfx}
libboost_regex-mt${addrsfx}
libboost_system-mt${addrsfx}
- libboost_thread-mt${addrsfx})
+ libboost_thread-mt${addrsfx}
+ libboost_url-mt${addrsfx})
elseif (LINUX)
target_link_libraries( ll::boost INTERFACE
boost_context-mt${addrsfx}
@@ -34,7 +35,8 @@ elseif (LINUX)
boost_regex-mt${addrsfx}
boost_signals-mt${addrsfx}
boost_system-mt${addrsfx}
- boost_thread-mt${addrsfx})
+ boost_thread-mt${addrsfx}
+ boost_url-mt${addrsfx})
elseif (DARWIN)
target_link_libraries( ll::boost INTERFACE
boost_context-mt${addrsfx}
@@ -43,7 +45,8 @@ elseif (DARWIN)
boost_program_options-mt${addrsfx}
boost_regex-mt${addrsfx}
boost_system-mt${addrsfx}
- boost_thread-mt${addrsfx})
+ boost_thread-mt${addrsfx}
+ boost_url-mt${addrsfx})
endif (WINDOWS)
if (LINUX)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 0f338931c0..73b614e0af 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -57,13 +57,11 @@ set(cmake_SOURCE_FILES
Tut.cmake
UI.cmake
UnixInstall.cmake
- URIPARSER.cmake
Variables.cmake
ViewerMiscLibs.cmake
VisualLeakDetector.cmake
LibVLCPlugin.cmake
WebRTC.cmake
- XmlRpcEpi.cmake
xxHash.cmake
ZLIBNG.cmake
)
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 30dee3c6c1..86c5b80fad 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -54,13 +54,14 @@ if(WINDOWS)
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
set(release_files
openjp2.dll
- libapr-1.dll
- libaprutil-1.dll
nghttp2.dll
- libhunspell.dll
- uriparser.dll
)
+ if(LLCOMMON_LINK_SHARED)
+ set(release_files ${release_files} libapr-1.dll)
+ set(release_files ${release_files} libaprutil-1.dll)
+ endif()
+
# OpenSSL
if(ADDRESS_SIZE EQUAL 64)
set(release_files ${release_files} libcrypto-1_1-x64.dll)
@@ -137,9 +138,14 @@ if(WINDOWS)
# Check each of them.
foreach(release_msvc_file
msvcp${MSVC_VER}.dll
+ msvcp${MSVC_VER}_1.dll
+ msvcp${MSVC_VER}_2.dll
+ msvcp${MSVC_VER}_atomic_wait.dll
+ msvcp${MSVC_VER}_codecvt_ids.dll
msvcr${MSVC_VER}.dll
vcruntime${MSVC_VER}.dll
vcruntime${MSVC_VER}_1.dll
+ vcruntime${MSVC_VER}_threads.dll
)
if(redist_path AND EXISTS "${redist_path}/${release_msvc_file}")
MESSAGE(STATUS "Copying redist file from ${redist_path}/${release_msvc_file}")
@@ -176,20 +182,20 @@ elseif(DARWIN)
)
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
set(release_files
- libapr-1.0.dylib
- libapr-1.dylib
- libaprutil-1.0.dylib
- libaprutil-1.dylib
- ${EXPAT_COPY}
- libhunspell-1.3.0.dylib
libndofdev.dylib
libnghttp2.dylib
libnghttp2.14.dylib
- liburiparser.dylib
- liburiparser.1.dylib
- liburiparser.1.0.27.dylib
)
+ if(LLCOMMON_LINK_SHARED)
+ set(release_files ${release_files}
+ libapr-1.0.dylib
+ libapr-1.dylib
+ libaprutil-1.0.dylib
+ libaprutil-1.dylib
+ )
+ endif()
+
if (TARGET ll::openal)
list(APPEND release_files libalut.dylib libopenal.dylib)
endif ()
@@ -225,12 +231,9 @@ elseif(LINUX)
if( USE_AUTOBUILD_3P )
list( APPEND release_files
- libapr-1.so.0
- libaprutil-1.so.0
libatk-1.0.so
libfreetype.so.6.6.2
libfreetype.so.6
- libhunspell-1.3.so.0.0.0
libopenjp2.so
libuuid.so.16
libuuid.so.16.0.22
@@ -239,6 +242,13 @@ elseif(LINUX)
libgmodule-2.0.so
libgobject-2.0.so
)
+
+ if(LLCOMMON_LINK_SHARED)
+ set(release_files ${release_files}
+ libapr-1.so.0
+ libaprutil-1.so.0
+ )
+ endif()
endif()
else(WINDOWS)
diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake
index 327fe8aa72..1a0b8789dc 100644
--- a/indra/cmake/EXPAT.cmake
+++ b/indra/cmake/EXPAT.cmake
@@ -7,14 +7,13 @@ add_library( ll::expat INTERFACE IMPORTED )
use_system_binary(expat)
use_prebuilt_binary(expat)
if (WINDOWS)
- target_link_libraries( ll::expat INTERFACE libexpatMT )
- set(EXPAT_COPY libexpatMT.dll)
-else (WINDOWS)
- target_link_libraries( ll::expat INTERFACE expat )
- if (DARWIN)
- set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
- else ()
- set(EXPAT_COPY libexpat.so.1 libexpat.so)
- endif ()
-endif (WINDOWS)
+ target_compile_definitions( ll::expat INTERFACE XML_STATIC=1)
+ target_link_libraries( ll::expat INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpatd.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.lib)
+else ()
+ target_link_libraries( ll::expat INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpat.a
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.a)
+endif ()
target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index bb037c0237..129679febd 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,4 +1,5 @@
# -*- cmake -*-
+include(Linking)
include(Prebuilt)
include_guard()
@@ -8,10 +9,16 @@ add_library( ll::hunspell INTERFACE IMPORTED )
use_system_binary(hunspell)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
- target_link_libraries( ll::hunspell INTERFACE libhunspell)
+ target_compile_definitions( ll::hunspell INTERFACE HUNSPELL_STATIC=1)
+ target_link_libraries( ll::hunspell INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libhunspell.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell.lib
+ )
elseif(DARWIN)
- target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+ target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+ )
elseif(LINUX)
- target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+ target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+ )
endif()
target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell)
diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake
index 252d7852d4..ade5a070cc 100644
--- a/indra/cmake/JPEG.cmake
+++ b/indra/cmake/JPEG.cmake
@@ -7,12 +7,14 @@ include_guard()
add_library( ll::libjpeg INTERFACE IMPORTED )
use_system_binary(libjpeg)
-use_prebuilt_binary(jpeglib)
+use_prebuilt_binary(libjpeg-turbo)
if (LINUX)
- target_link_libraries( ll::libjpeg INTERFACE jpeg)
+ target_link_libraries( ll::libjpeg INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libjpeg.a)
elseif (DARWIN)
- target_link_libraries( ll::libjpeg INTERFACE jpeg)
+ target_link_libraries( ll::libjpeg INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libjpeg.a)
elseif (WINDOWS)
- target_link_libraries( ll::libjpeg INTERFACE jpeglib)
+ target_link_libraries( ll::libjpeg INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/jpeg.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/jpeg.lib)
endif (LINUX)
target_include_directories( ll::libjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 9e3707ff17..dd43ca4916 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -6,5 +6,3 @@ include(EXPAT)
include(Tracy)
include(xxHash)
include(ZLIBNG)
-
-include(XmlRpcEpi)
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 735f5e8052..1e81532551 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -6,7 +6,6 @@ include(Boost)
include_guard()
-add_library( ll::pcre INTERFACE IMPORTED )
add_library( ll::minizip-ng INTERFACE IMPORTED )
add_library( ll::libxml INTERFACE IMPORTED )
add_library( ll::colladadom INTERFACE IMPORTED )
@@ -22,11 +21,8 @@ use_system_binary( colladadom )
use_prebuilt_binary(colladadom)
use_prebuilt_binary(minizip-ng) # needed for colladadom
-use_prebuilt_binary(pcre)
use_prebuilt_binary(libxml2)
-target_link_libraries( ll::pcre INTERFACE pcrecpp pcre )
-
if (WINDOWS)
target_link_libraries( ll::minizip-ng INTERFACE libminizip )
else()
diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake
deleted file mode 100644
index 6c33ff70e1..0000000000
--- a/indra/cmake/URIPARSER.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- cmake -*-
-
-include_guard()
-
-include(Prebuilt)
-
-add_library( ll::uriparser INTERFACE IMPORTED )
-
-use_system_binary( uriparser )
-
-use_prebuilt_binary(uriparser)
-if (WINDOWS)
- target_link_libraries( ll::uriparser INTERFACE uriparser)
-elseif (LINUX)
- target_link_libraries( ll::uriparser INTERFACE uriparser)
-elseif (DARWIN)
- target_link_libraries( ll::uriparser INTERFACE liburiparser.dylib)
-endif (WINDOWS)
-target_include_directories( ll::uriparser SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/uriparser)
diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake
deleted file mode 100644
index 6409f9d6e2..0000000000
--- a/indra/cmake/XmlRpcEpi.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- cmake -*-
-include(Prebuilt)
-
-include_guard()
-add_library( ll::xmlrpc-epi INTERFACE IMPORTED )
-
-use_system_binary( xmlrpc-epi )
-
-use_prebuilt_binary(xmlrpc-epi)
-target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi )
-target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)