cmake: check that policy CMP0020 can be applied

This commit is contained in:
Hugues Delorme 2014-02-04 16:12:55 +01:00
parent 50f2bef268
commit 0634f4087b

View File

@ -96,7 +96,9 @@ if(BUILD_WITH_QT_SUPPORT)
include(${QT_USE_FILE}) include(${QT_USE_FILE})
add_definitions(${QT_DEFINITIONS}) add_definitions(${QT_DEFINITIONS})
else() else()
cmake_policy(SET CMP0020 NEW) if ("${CMAKE_VERSION}" VERSION_GREATER 2.8.11)
cmake_policy(SET CMP0020 NEW)
endif()
find_package(Qt5Core REQUIRED) find_package(Qt5Core REQUIRED)
endif() endif()