Unverified Commit 27655f0a authored by Leona Maroni's avatar Leona Maroni Committed by GitHub
Browse files

nvidia-texture-tools: fix build with CMake 4 (#450600)

parents fd665e4a 63f21ee8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -20,6 +20,12 @@ stdenv.mkDerivation {
    # Make a recently added pure virtual function just virtual,
    # to keep compatibility.
    sed -i 's/virtual void endImage() = 0;/virtual void endImage() {}/' src/nvtt/nvtt.h

    # Fix build with CMake 4
    substituteInPlace CMakeLists.txt --replace-fail \
      "CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)" "CMAKE_MINIMUM_REQUIRED(VERSION 3.10)"
    substituteInPlace extern/libsquish-1.15/CMakeLists.txt --replace-fail \
      "CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)" "CMAKE_MINIMUM_REQUIRED(VERSION 3.10)"
  ''
  + lib.optionalString stdenv.hostPlatform.isAarch64 ''
    # remove x86_64-only libraries