Skip to content

Commit 8e76795

Browse files
authored
Merge pull request #331 from AlchemyViewer/rye/static-crt
Retarget windows CRT to MultiThreaded(Debug) for compat with future plugin brokers
2 parents 325137c + ac2e1dc commit 8e76795

29 files changed

Lines changed: 126 additions & 109 deletions

.github/workflows/build.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
velopack_mac_bundle_id: ${{ steps.build.outputs.velopack_mac_bundle_id }}
174174
env:
175175
# Sets Xcode version used for build
176-
DEVELOPER_DIR: "/Applications/Xcode_26.2.app/Contents/Developer"
176+
DEVELOPER_DIR: "/Applications/Xcode_26.6.app/Contents/Developer"
177177
# Ensure that Linden viewer builds engage Bugsplat.
178178
BUGSPLAT_DB: ${{ needs.setup.outputs.bugsplat_db }}
179179
# Decide if we're building tests or the viewer
@@ -334,17 +334,17 @@ jobs:
334334
Windows)
335335
cmake_preset_name="vs2026$cmake_preset_postfix"
336336
build_directory="build-Windows-$cmake_preset_name"
337-
vcpkg_triplet="x64-windows-secondlife-release"
337+
vcpkg_triplet="x64-windows-alchemy-release"
338338
;;
339339
macOS)
340340
cmake_preset_name="ninja$cmake_preset_postfix-$BUILD_ARCH"
341341
build_directory="build-Darwin-$cmake_preset_name"
342-
vcpkg_triplet="$BUILD_ARCH-osx-secondlife-release"
342+
vcpkg_triplet="$BUILD_ARCH-osx-alchemy-release"
343343
;;
344344
Linux)
345345
cmake_preset_name="ninja$cmake_preset_postfix"
346346
build_directory="build-Linux-$cmake_preset_name"
347-
vcpkg_triplet="x64-linux-secondlife-release"
347+
vcpkg_triplet="x64-linux-alchemy-release"
348348
;;
349349
esac
350350

indra/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ option(ENABLE_SIGNING "Enable signing the viewer" OFF)
118118
set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
119119

120120
# macOS deploy target(must be set BEFORE first project call)
121-
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum macOS version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.")
121+
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0" CACHE STRING "Minimum macOS version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.")
122122

123123
# Set our supported configuration types
124124
set(CMAKE_CONFIGURATION_TYPES "Debug;OptDebug;RelWithDebInfo;Release" CACHE STRING "Supported build types.")

indra/cmake/00-Common.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ endif()
127127
if(WINDOWS)
128128
set(CMAKE_MSVC_RUNTIME_CHECKS "$<$<CONFIG:Debug>:StackFrameErrorCheck;UninitializedVariable>")
129129
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT $<IF:$<CONFIG:Debug,OptDebug>,EditAndContinue,ProgramDatabase>)
130-
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
130+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
131131

132132
# Don't build DLLs.
133133
set(BUILD_SHARED_LIBS OFF)
@@ -137,10 +137,8 @@ if(WINDOWS)
137137
$<$<CONFIG:Release>:/OPT:ICF>
138138
/DEBUG:FULL
139139
/LARGEADDRESSAWARE
140-
/NODEFAULTLIB:LIBCMT
141-
/NODEFAULTLIB:LIBCMTD
142-
$<$<CONFIG:OptDebug,RelWithDebInfo,Release>:/NODEFAULTLIB:MSVCRTD>
143-
$<$<CONFIG:Debug>:/NODEFAULTLIB:MSVCRT>
140+
$<$<CONFIG:OptDebug,RelWithDebInfo,Release>:/NODEFAULTLIB:LIBCMTD>
141+
$<$<CONFIG:Debug>:/NODEFAULTLIB:LIBCMT>
144142
)
145143

146144
add_compile_definitions(
@@ -166,6 +164,10 @@ if(WINDOWS)
166164
$<$<CONFIG:Debug>:DISABLE_WEBRTC=1>
167165
)
168166

167+
if(DISABLE_WEBRTC)
168+
add_compile_definitions(DISABLE_WEBRTC=1)
169+
endif()
170+
169171
# Options shared between all configurations
170172
add_compile_options(
171173
/utf-8 # matches macOS and Linux behaviors and allows unicode in source files

indra/cmake/BootstrapVcpkg.cmake

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ if(NOT DEFINED VCPKG_TARGET_TRIPLET)
3333

3434
if(WIN32)
3535
if(LL_GENERATOR_IS_MULTI_CONFIG)
36-
set(VCPKG_TARGET_TRIPLET "x64-windows-secondlife")
36+
set(VCPKG_TARGET_TRIPLET "x64-windows-alchemy")
3737
else()
3838
if(CMAKE_BUILD_TYPE STREQUAL Debug)
39-
set(VCPKG_TARGET_TRIPLET "x64-windows-secondlife")
39+
set(VCPKG_TARGET_TRIPLET "x64-windows-alchemy")
4040
else()
41-
set(VCPKG_TARGET_TRIPLET "x64-windows-secondlife-release")
41+
set(VCPKG_TARGET_TRIPLET "x64-windows-alchemy-release")
4242
endif()
4343
endif()
4444
elseif(APPLE)
@@ -49,33 +49,33 @@ if(NOT DEFINED VCPKG_TARGET_TRIPLET)
4949
endif()
5050
if(LL_GENERATOR_IS_MULTI_CONFIG)
5151
if(OS_PLATFORM STREQUAL arm64)
52-
set(VCPKG_TARGET_TRIPLET "arm64-osx-secondlife")
52+
set(VCPKG_TARGET_TRIPLET "arm64-osx-alchemy")
5353
else()
54-
set(VCPKG_TARGET_TRIPLET "x64-osx-secondlife")
54+
set(VCPKG_TARGET_TRIPLET "x64-osx-alchemy")
5555
endif()
5656
else()
5757
if(OS_PLATFORM STREQUAL arm64)
5858
if(CMAKE_BUILD_TYPE STREQUAL Debug)
59-
set(VCPKG_TARGET_TRIPLET "arm64-osx-secondlife")
59+
set(VCPKG_TARGET_TRIPLET "arm64-osx-alchemy")
6060
else()
61-
set(VCPKG_TARGET_TRIPLET "arm64-osx-secondlife-release")
61+
set(VCPKG_TARGET_TRIPLET "arm64-osx-alchemy-release")
6262
endif()
6363
else()
6464
if(CMAKE_BUILD_TYPE STREQUAL Debug)
65-
set(VCPKG_TARGET_TRIPLET "x64-osx-secondlife")
65+
set(VCPKG_TARGET_TRIPLET "x64-osx-alchemy")
6666
else()
67-
set(VCPKG_TARGET_TRIPLET "x64-osx-secondlife-release")
67+
set(VCPKG_TARGET_TRIPLET "x64-osx-alchemy-release")
6868
endif()
6969
endif()
7070
endif()
7171
else()
7272
if(LL_GENERATOR_IS_MULTI_CONFIG)
73-
set(VCPKG_TARGET_TRIPLET "x64-linux-secondlife")
73+
set(VCPKG_TARGET_TRIPLET "x64-linux-alchemy")
7474
else()
7575
if(CMAKE_BUILD_TYPE STREQUAL Debug)
76-
set(VCPKG_TARGET_TRIPLET "x64-linux-secondlife")
76+
set(VCPKG_TARGET_TRIPLET "x64-linux-alchemy")
7777
else()
78-
set(VCPKG_TARGET_TRIPLET "x64-linux-secondlife-release")
78+
set(VCPKG_TARGET_TRIPLET "x64-linux-alchemy-release")
7979
endif()
8080
endif()
8181
endif()

indra/cmake/CURL.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ add_library( ll::libcurl INTERFACE IMPORTED )
55
find_package(CURL REQUIRED)
66
target_link_libraries(ll::libcurl INTERFACE CURL::libcurl)
77

8-
if(LINUX OR DARWIN)
9-
find_library(NGHTTP2_LIBRARIES nghttp2 REQUIRED)
10-
target_link_libraries(ll::libcurl INTERFACE ${NGHTTP2_LIBRARIES})
11-
endif()
8+
find_library(NGHTTP2_LIBRARIES nghttp2 REQUIRED)
9+
target_link_libraries(ll::libcurl INTERFACE ${NGHTTP2_LIBRARIES})

indra/cmake/Collada-Dom.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ find_path(COLLADA_DOM_INCLUDE_DIRS NAMES dae.h PATHS "${_VCPKG_INSTALLED_DIR}/${
88

99
target_include_directories(ll::colladadom SYSTEM INTERFACE "${COLLADA_DOM_INCLUDE_DIRS}" "${COLLADA_DOM_INCLUDE_DIRS}/1.4")
1010

11-
if(WINDOWS)
12-
target_compile_definitions(ll::colladadom INTERFACE DOM_DYNAMIC=1)
13-
endif()
14-
15-
1611
find_library(COLLADA14_LIBRARY_RELEASE
1712
NAMES collada14dom
1813
PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib"

indra/cmake/Copy3rdPartyLibs.cmake

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,40 +41,40 @@ if(WINDOWS)
4141
set(vcpkg_lib_dir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin")
4242

4343
# Files that vcpkg fails to automatically stage
44-
set(release_libs "legacy.dll") # OpenSSL legacy engine
44+
# set(release_libs "legacy.dll") # OpenSSL legacy engine
4545

4646
#*******************************
4747
# Copy MS C runtime dlls, required for packaging.
48-
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
49-
include(InstallRequiredSystemLibraries)
50-
51-
foreach(system_lib_file IN LISTS CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
52-
get_filename_component(system_lib_directory ${system_lib_file} DIRECTORY)
53-
get_filename_component(system_lib_filename ${system_lib_file} NAME )
54-
MESSAGE(DEBUG "Copying redist file from ${system_lib_directory}/${system_lib_filename}")
55-
to_staging_dirs(
56-
${system_lib_directory}
57-
third_party_targets
58-
${system_lib_filename}
59-
)
60-
to_viewer_staging_dirs(
61-
${system_lib_directory}
62-
third_party_targets
63-
${system_lib_filename}
64-
)
65-
to_viewer_staging_subdirs(
66-
"llplugin"
67-
${system_lib_directory}
68-
third_party_targets
69-
${system_lib_filename}
70-
)
71-
endforeach()
72-
73-
to_viewer_staging_dirs(
74-
${vcpkg_lib_dir}
75-
third_party_targets
76-
${release_libs}
77-
)
48+
# set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
49+
# include(InstallRequiredSystemLibraries)
50+
51+
# foreach(system_lib_file IN LISTS CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
52+
# get_filename_component(system_lib_directory ${system_lib_file} DIRECTORY)
53+
# get_filename_component(system_lib_filename ${system_lib_file} NAME )
54+
# MESSAGE(DEBUG "Copying redist file from ${system_lib_directory}/${system_lib_filename}")
55+
# to_staging_dirs(
56+
# ${system_lib_directory}
57+
# third_party_targets
58+
# ${system_lib_filename}
59+
# )
60+
# to_viewer_staging_dirs(
61+
# ${system_lib_directory}
62+
# third_party_targets
63+
# ${system_lib_filename}
64+
# )
65+
# to_viewer_staging_subdirs(
66+
# "llplugin"
67+
# ${system_lib_directory}
68+
# third_party_targets
69+
# ${system_lib_filename}
70+
# )
71+
# endforeach()
72+
73+
# to_viewer_staging_dirs(
74+
# ${vcpkg_lib_dir}
75+
# third_party_targets
76+
# ${release_libs}
77+
# )
7878

7979
if(USE_FMODSTUDIO)
8080
list(APPEND fmod_libs

indra/newview/llvoiceclient.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "lltrans.h"
4040
#include "llmutelist.h"
4141
#include "llnearbyvoicemoderation.h"
42+
#include "llviewerregion.h"
4243

4344
const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f;
4445

@@ -186,10 +187,12 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age
186187
void LLVoiceClient::handleSimulatorFeaturesReceived(const LLSD &simulatorFeatures)
187188
{
188189
std::string voiceServerType = simulatorFeatures["VoiceServerType"].asString();
190+
#ifndef DISABLE_WEBRTC
189191
if (voiceServerType.empty())
190192
{
191193
voiceServerType = WEBRTC_VOICE_SERVER_TYPE;
192194
}
195+
#endif
193196

194197
if (mSpatialVoiceModule && !mNonSpatialVoiceModule)
195198
{
@@ -600,12 +603,14 @@ LLVoiceP2POutgoingCallInterface *LLVoiceClient::getOutgoingCallInterface(const L
600603
LLVoiceVersionInfo versionInfo = LLVoiceClient::getInstance()->getVersion();
601604
voice_server_type = versionInfo.internalVoiceServerType;
602605
}
606+
#ifndef DISABLE_WEBRTC
603607
if (voiceChannelInfo.has("voice_server_type") && voiceChannelInfo["voice_server_type"] != voice_server_type)
604608
{
605609
// there's a mismatch between what the peer is offering and what our server
606610
// can handle, so default to webrtc
607611
voice_server_type = WEBRTC_VOICE_SERVER_TYPE;
608612
}
613+
#endif
609614
LLVoiceModuleInterface *module = getVoiceModule(voice_server_type);
610615
return dynamic_cast<LLVoiceP2POutgoingCallInterface *>(module);
611616
}

indra/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"builtin-baseline": "cd61e1e26a038e82d6550a3ebbe0fbbfe7da78e3",
2+
"builtin-baseline": "a0400024711b283056538ac19ced80b91a83c24c",
33
"dependencies": [
44
"alchemy-branding",
55
"alchemy-dictionaries",

indra/vcpkg/ports/apr/vcpkg.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "apr",
33
"version": "1.7.6",
4+
"port-version": 1,
45
"description": "The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems.",
56
"homepage": "https://apr.apache.org/",
67
"license": "Apache-2.0",

0 commit comments

Comments
 (0)