diff --git a/extern/cesium-native b/extern/cesium-native index b164fc915..2313ce01c 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit b164fc915ffd9080e0d3f7c3f72076b1e65090ed +Subproject commit 2313ce01cc567e35588c25795831fb973975e162 diff --git a/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake b/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake index d2e4b7fc1..90455d171 100644 --- a/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake +++ b/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake @@ -4,6 +4,7 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_ENV_PASSTHROUGH "UNREAL_ENGINE_ROOT") +set(VCPKG_POLICY_ONLY_RELEASE_CRT enabled) # Unreal Engine adds /Zp8 in 64-bit Windows builds to align structs to 8 bytes instead of the # default of 16 bytes. There's this nice note in the documentation for that option: @@ -15,9 +16,17 @@ set(VCPKG_ENV_PASSTHROUGH "UNREAL_ENGINE_ROOT") # between compilation units using different versions of that flag. We compile cesium-native # with this same option to avoid super-dodgy and hard to debug issues. # https://github.com/EpicGames/UnrealEngine/blob/5.2.1-release/Engine/Source/Programs/UnrealBuildTool/Platform/Windows/VCToolChain.cs -set(VCPKG_CXX_FLAGS "/MD /Zp8") +set(VCPKG_CXX_FLAGS "/Zp8") set(VCPKG_C_FLAGS "${VCPKG_CXX_FLAGS}") +# Use an unreasonable amount of force to replace /MDd (MultiThreadedDebugDLL) with /MD (MultiThreadedDLL) +# and ensure that `_DEBUG` is not defined, as required by Unreal Engine's use of the release runtime library. +# Only CMAKE_MSVC_RUNTIME_LIBRARY would be required if all our third-party libraries used CMake 3.15+, but alas. +set(VCPKG_CMAKE_CONFIGURE_OPTIONS "") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreadedDLL") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_FLAGS_DEBUG:STRING=/MD /Z7 /Ob0 /Od /RTC1") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_C_FLAGS_DEBUG:STRING=/MD /Z7 /Ob0 /Od /RTC1") + # When building official binaries on CI, use a very specific MSVC toolset version (which must be installed). # When building locally, use the default. if(DEFINED ENV{CI})