cesium-native icon indicating copy to clipboard operation
cesium-native copied to clipboard

Fix build problems with CMake 4.0

Open kring opened this issue 9 months ago • 3 comments

CMake 4.0 is already rolling out on GitHub Actions, and our users are likely to start adopting it soon, too. Unfortunately, cesium-native currently doesn't build with this version because some of our dependencies (via vcpkg) use features that have been removed (or at least disabled by default) in CMake 4.0.

We need to fix this. It's possible this is just a matter of upgrading to a newer vcpkg package release where these problems have already been fixed. If that doesn't help, we can likely work around it with overlay ports or by invoking cmake / vcpkg with extra arguments (perhaps we can even do this automatically via ezvcpkg). As a last resort, we can document that CMake 3.x is currently required.

kring avatar Apr 01 '25 10:04 kring

vcpkg hasn't done anything special so far, see https://github.com/microsoft/vcpkg/issues/44726

timoore avatar Apr 01 '25 15:04 timoore

I can build successfully with these environment variables in #1026:

      "environment": {
        "CMAKE_POLICY_VERSION_MINIMUM": "3.5",
        "VCPKG_KEEP_ENV_VARS": "CMAKE_POLICY_VERSION_MINIMUM"
      }

timoore avatar Apr 01 '25 16:04 timoore

vcpkg hasn't done anything special so far, see https://github.com/microsoft/vcpkg/issues/44726

Looks like they may have fixed this now with a change to vcpkg to automatically set CMAKE_POLICY_VERSION_MINIMUM to 3.5 when running in CMake 4.0+.

kring avatar Apr 03 '25 02:04 kring