commit 02db183373f8112f95ed554e832d212ab2a52d7d
Author: Vincent van Ravesteijn <[email protected]>
Date:   Wed Oct 28 20:19:49 2015 +0100

    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.

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

Reply via email to