From 9e581f91db684abbcaf903223a96c687915610ff Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 17 Jul 2015 08:21:28 +0000 Subject: [PATCH] Added cmake version checked for cmake_policy setting git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@14974 16af8721-9629-0410-8352-f15c8da7e697 --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 096b72108..4380a0d6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -730,8 +730,10 @@ IF(OSG_USE_QT AND NOT ANDROID) FIND_PACKAGE(Qt5WebKitWidgets QUIET) IF(COMMAND cmake_policy) - # Qt5 qt5_use_modules usage was causing "Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_ properties." warnings - cmake_policy(SET CMP0043 NEW) + IF(${CMAKE_MAJOR_VERSION} GREATER 2) + # Qt5 qt5_use_modules usage was causing "Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_ properties." warnings + cmake_policy(SET CMP0043 NEW) + ENDIF() ENDIF() ENDIF()