cmake: Properly suppress CMake warning about qtmain

CMake policy CMP0020 exists since version 2.8.11, so this prevents an
error on older versions.

This fixes up commit ec6f51b.
This commit is contained in:
Vincent van Ravesteijn 2015-10-28 20:19:49 +01:00
parent e430586ec3
commit 02db183373

View File

@ -40,6 +40,9 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0005 OLD) cmake_policy(SET CMP0005 OLD)
# Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION # Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION
cmake_policy(SET CMP0006 NEW) cmake_policy(SET CMP0006 NEW)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 OLD)
endif()
if(POLICY CMP0028) if(POLICY CMP0028)
cmake_policy(SET CMP0028 OLD) cmake_policy(SET CMP0028 OLD)
endif() endif()
@ -47,7 +50,6 @@ if(COMMAND cmake_policy)
# COMPILE_DEFINITIONS are not used yet. Enable new behavior. # COMPILE_DEFINITIONS are not used yet. Enable new behavior.
cmake_policy(SET CMP0043 NEW) cmake_policy(SET CMP0043 NEW)
endif() endif()
cmake_policy(SET CMP0020 OLD)
endif() endif()
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)