From 16b9a8e7b1f23f48296c96cdcfa5a595ebed3d60 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 28 Sep 2025 21:48:41 +0100 Subject: [PATCH] Fix libpng on CMake 4.0 --- 3rdParty/libpng/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/3rdParty/libpng/CMakeLists.txt b/3rdParty/libpng/CMakeLists.txt index b0d291f92..30de253c0 100644 --- a/3rdParty/libpng/CMakeLists.txt +++ b/3rdParty/libpng/CMakeLists.txt @@ -1,5 +1,10 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) +if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0") + # Workaround for removal of CMake 3.5 compatibility in CMake 4.0+. + set(CMAKE_POLICY_VERSION_MINIMUM 3.22) +endif() + if(NOT DISABLE_LTO) # Force CMake to raise an error if INTERPROCEDURAL_OPTIMIZATION # is enabled and compiler does not support IPO