From e7629dc46fc9fba3227835701b4e169edc07223f Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Thu, 18 Jan 2024 21:22:03 -0600 Subject: [PATCH] CMake: only set policy CMP0148 to OLD if version >= 3.27 Co-authored-by: 0xFFFC0000 <0xFFFC0000@proton.me> --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c35a225a..83d760c66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,8 +40,9 @@ include(CheckCXXCompilerFlag) include(CheckLinkerFlag) include(CheckLibraryExists) include(CheckFunctionExists) - -cmake_policy(SET CMP0148 OLD) +if (POLICY CMP0148) + cmake_policy(SET CMP0148 OLD) # https://cmake.org/cmake/help/latest/policy/CMP0148.html +endif() include(FindPythonInterp) if (IOS)