CMakeLists: backwards compatibility with CMake < 3.0.
This commit is contained in:
committed by
Alexander Gessler
parent
b700cd917f
commit
455d190fd0
@@ -1,9 +1,12 @@
|
||||
cmake_minimum_required(VERSION 2.4.4)
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
|
||||
# use the old project command http://www.cmake.org/cmake/help/v3.0/policy/CMP0048.html
|
||||
# CMake 3.0 changed the project command, setting policy CMP0048 reverts to the old behaviour.
|
||||
# See http://www.cmake.org/cmake/help/v3.0/policy/CMP0048.html
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0048 OLD)
|
||||
if(CMAKE_MAJOR_VERSION GREATER 2)
|
||||
cmake_policy(SET CMP0048 OLD)
|
||||
endif()
|
||||
project(zlib C)
|
||||
cmake_policy(POP)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user