From Jan Ciger, " I have put there in the comment a nicer way of doing version

checks, but that needs at least CMake 2.6.2."
This commit is contained in:
Robert Osfield 2013-06-21 08:03:56 +00:00
parent 715dd4e930
commit fe461c77fc

View File

@ -31,6 +31,17 @@ if(COMMAND cmake_policy)
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0) if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0)
cmake_policy(SET CMP0008 OLD) cmake_policy(SET CMP0008 OLD)
endif() endif()
# disable autolinking to qtmain as we have our own main() functions (new in Qt 5.1)
if((${CMAKE_MAJOR_VERSION} EQUAL 2 OR ${CMAKE_MAJOR_VERSION} GREATER 2) AND
(${CMAKE_MINOR_VERSION} EQUAL 8 OR ${CMAKE_MINOR_VERSION} GREATER 8) AND
${CMAKE_PATCH_VERSION} GREATER 10)
cmake_policy(SET CMP0020 OLD)
endif()
# nicer version check - but needs at least CMake 2.6.2? Worth upgrading the requirements?
#if("${CMAKE_VERSION}" VERSION_GREATER 2.8.10)
endif() endif()
PROJECT(OpenSceneGraph) PROJECT(OpenSceneGraph)