From: Simon McVittie Date: Thu, 12 Mar 2015 14:58:19 +0000 (+0000) Subject: cmake: only set CMP0053, CMP0054 on CMake >= 3.1 X-Git-Tag: dbus-1.9.16~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21c41b3eb0efb13a118d614336fc41a453d83bfe;p=thirdparty%2Fdbus.git cmake: only set CMP0053, CMP0054 on CMake >= 3.1 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450 Reviewed-by: Ralf Habacker --- 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