From 21c41b3eb0efb13a118d614336fc41a453d83bfe Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 12 Mar 2015 14:58:19 +0000 Subject: [PATCH] cmake: only set CMP0053, CMP0054 on CMake >= 3.1 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Ralf Habacker --- cmake/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 309cdb2e8..0b33ca496 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -14,8 +14,10 @@ endif(COMMAND cmake_policy) if(CMAKE_MAJOR_VERSION GREATER 2) cmake_policy(SET CMP0026 NEW) - cmake_policy(SET CMP0053 NEW) - cmake_policy(SET CMP0054 NEW) + if (CMAKE_MAJOR_VERSION GREATER 4 OR CMAKE_MINOR_VERSION GREATER 1) + cmake_policy(SET CMP0053 NEW) + cmake_policy(SET CMP0054 NEW) + endif() endif() # detect version -- 2.47.3