From: Manuel Nickschas Date: Thu, 24 Jul 2014 21:26:58 +0000 (+0200) Subject: Fix support for CMake < 3 X-Git-Tag: 0.10.1~21 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=8984dd51b7225f7e7461214cc26049aaeb6da323 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. --- 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