From: Manuel Nickschas Date: Thu, 24 Jul 2014 21:20:41 +0000 (+0200) Subject: Fix support for CMake < 3 X-Git-Tag: 0.11.0~24 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=14a3d4e9ffb85314913892a075479d32cc28020a 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 0c1141f8..7e238174 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,8 +36,9 @@ include(QuasselMacros) # Setting COMPILE_DEFINITIONS_ is deprecated since CMake 3.0 in favor of generator expressions. # These have existed since CMake 2.8.10; until we depend on that, we have to explicitly enable the old policy. -cmake_policy(SET CMP0043 OLD) - +if (CMAKE_MAJOR_VERSION GREATER 2) + cmake_policy(SET CMP0043 OLD) +endif() # Options and variables that can be set on the command line #####################################################################