cmake - fix errors on older cmake #7023

This commit is contained in:
Andrej730
2025-08-14 12:13:44 +05:00
parent ff3c5b849e
commit 3cd2963b01
2 changed files with 10 additions and 4 deletions
+3 -1
View File
@@ -34,10 +34,12 @@ endif()
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
if (POLICY CMP0144)
if(POLICY CMP0144) # 3.27
cmake_policy(SET CMP0144 NEW) # find_package() uses upper-case <PACKAGENAME>_ROOT variables.
endif()
if(POLICY CMP0167) # 3.30
cmake_policy(SET CMP0167 OLD)
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
+4
View File
@@ -17,8 +17,12 @@
# #
################################################################################
if(POLICY CMP0148) # 3.27
cmake_policy(SET CMP0148 OLD)
endif()
if(POLICY CMP0177) # 3.31
cmake_policy(SET CMP0177 OLD)
endif()
FIND_PACKAGE(SWIG)
IF(NOT SWIG_FOUND)