Commit 288698b6 authored by Dave Walker's avatar Dave Walker
Browse files

catimg: fix build with cmake 4

CMake 4 removed compatibility with CMake versions < 3.5.
Set CMAKE_POLICY_VERSION_MINIMUM to 3.5 to fix the build failure.

Fixes: https://github.com/NixOS/nixpkgs/issues/449801


Signed-off-by: default avatarDave Walker <dave@daviey.com>
parent 98ecda14
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,13 @@ stdenv.mkDerivation rec {
  };

  nativeBuildInputs = [ cmake ];

  # Fix build with CMake 4: https://github.com/NixOS/nixpkgs/issues/449801
  # CMake 4 removed support for CMake < 3.5, so we set the minimum policy version
  cmakeFlags = [
    (lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
  ];

  env = lib.optionalAttrs (stdenv.hostPlatform.libc == "glibc") {
    CFLAGS = "-D_DEFAULT_SOURCE";
  };