cmake: only set CMP0053, CMP0054 on CMake >= 3.1

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89450
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
This commit is contained in:
Simon McVittie 2015-03-12 14:58:19 +00:00 committed by Ralf Habacker
parent 92c39d1d8a
commit 21c41b3eb0

View file

@ -14,8 +14,10 @@ endif(COMMAND cmake_policy)
if(CMAKE_MAJOR_VERSION GREATER 2)
cmake_policy(SET CMP0026 NEW)
cmake_policy(SET CMP0053 NEW)
cmake_policy(SET CMP0054 NEW)
if (CMAKE_MAJOR_VERSION GREATER 4 OR CMAKE_MINOR_VERSION GREATER 1)
cmake_policy(SET CMP0053 NEW)
cmake_policy(SET CMP0054 NEW)
endif()
endif()
# detect version