From 67fe2020058beea463eff34af3c58f01b3dac036 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 29 Nov 2022 23:47:22 +0100
Subject: [PATCH] cmake: use if(POLICY) to check for policy existence
---
CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21bb0c0..dba5978 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -128,8 +128,7 @@ if(APPLE)
# set(DYLIB_CURRENT_VERSION 12.61.0 CACHE STRING "library current version")
find_package(X11)
include_directories("${X11_INCLUDE_DIR}")
- if(CMAKE_VERSION VERSION_LESS 3.9)
- else()
+ if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW) # on macOS, don't let RPATH affect install_name.
endif()
endif()