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: Dave Walker <dave@daviey.com>
This commit is contained in:
@@ -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";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user