CesiumGS / cesium-unreal

Bringing the 3D geospatial ecosystem to Unreal Engine
https://cesium.com/platform/cesium-for-unreal/
Apache License 2.0
879 stars 285 forks source link

Use the vcpkg-enabled version of cesium-native. #1447

Open kring opened 1 month ago

kring commented 1 month ago

This depends on CesiumGS/cesium-native#820.

To do:

CC @jherico (thanks for all your work on this on the cesium-native side!)

kring commented 2 weeks ago

I finally got around to trying to use the CI-produced Windows binaries on my system, and of course they immediately crash on startup. The immediate problem is the lovely new MSVC 14.40 compiler that GitHub recently rolled out on the windows-2022 runner, which apparently generates code that crashes the first time your code tries to use std::mutex if your MSVCRT runtime is an older version. The real problem, though, is that vcpkg is not building with MSVC 14.34, which is the version UE 5.2 and 5.3 use and therefore is also the version that cesium-native and all of its dependencies must use (UE 5.4 uses 14.38, but MSVC versions are backward compatible so it's fine for us to compile with 14.34 even in UE 5.4). Should be fixable by setting the VCPKG_PLATFORM_TOOLSET_VERSION variable in the x64-windows-unreal.cmake triplet file.

kring commented 6 days ago

Just dropping a reminder for myself here that this PR also removes the debug section compression on Linux. The compressed debug sections cause linker errors when cross-compiling for Linux from Windows:

PackagingResults: Error: C:/Program Files/Epic Games/UE_5.2/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Development/CesiumRuntime/Module.CesiumRuntime.2_of_11.cpp.o:(.debug_gnu_pubtypes) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support

Now that the binaries aren't so enormous, compressing the debug sections isn't as essential.