From fe461c77fc512d4c58979ed10595c71d0bb977ad Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 21 Jun 2013 08:03:56 +0000 Subject: [PATCH] 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." --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71184cc37..547579472 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) cmake_policy(SET CMP0008 OLD) 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() PROJECT(OpenSceneGraph)