From 8984dd51b7225f7e7461214cc26049aaeb6da323 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Thu, 24 Jul 2014 23:26:58 +0200 Subject: [PATCH] Fix support for CMake < 3 Meh. Apparently I can't just set behavior for future policies, so we need to ensure that we're actually running CMake 3. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ed071a8..ac51b164 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,10 +34,10 @@ include(CheckCXXCompilerFlag) # For building against Qt5, we check for an even newer cmake version below! cmake_minimum_required(VERSION 2.8.1 FATAL_ERROR) -if(COMMAND cmake_policy) +if(CMAKE_MAJOR_VERSION GREATER 2) cmake_policy(SET CMP0026 OLD) cmake_policy(SET CMP0043 OLD) -endif(COMMAND cmake_policy) +endif() # Use our own (well, and KDE's) version of some modules # In particular cmake's own FindQt4 and FindOpenSSL are quite buggy -- 2.20.1