From adced97dcdabd0165c272fb728e1288cb2031d88 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 21 Dec 2008 20:24:56 +0000 Subject: [PATCH] From Mattias Helsing, "Replace the IF(POLICY CMP0008) with an absolute version check for cmake > 2.6.0. The POLICY keyword is only valid starting with cmake-2.4.7 so using it broke cmake 2.4.5/6 support." --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc69de61d..61b0597df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,9 +22,9 @@ if(COMMAND cmake_policy) # cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names # quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below." - if(POLICY CMP0008) + if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0) cmake_policy(SET CMP0008 OLD) - endif(POLICY CMP0008) + endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0) endif(COMMAND cmake_policy) PROJECT(OpenSceneGraph)