From 38e44c3f244af285632168fea4cb377fc6a4cc64 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 11 Nov 2024 09:28:55 +1100 Subject: [PATCH 1/3] Test Unreal against CesiumGS/cesium-native#962. --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index b164fc915..ca09496f2 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit b164fc915ffd9080e0d3f7c3f72076b1e65090ed +Subproject commit ca09496f20c90638477f7e0216c1bf8f1ee83b5b From e238e1c8b47155ffd27369e19409143267ac051d Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 11 Nov 2024 18:09:32 +1100 Subject: [PATCH 2/3] Fix problems building vcpkg Debug libs for UE. --- .../vcpkg-overlays/triplets/x64-windows-unreal.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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}) From ec0ad2ce9e569d5ae3e89fa98826f481bd81ab59 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 11 Nov 2024 18:15:39 +1100 Subject: [PATCH 3/3] Update cesium-native. --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index ca09496f2..2313ce01c 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit ca09496f20c90638477f7e0216c1bf8f1ee83b5b +Subproject commit 2313ce01cc567e35588c25795831fb973975e162