From d85d98e916a07c5269e9edacf1e8ff1b7b267a3d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 14 Jul 2015 13:26:40 +0000 Subject: [PATCH] Added cmake_policy(SET CMP0043 NEW) usage when compiling against Qt5 as it was causing a warning we couldn't fix on the OSG side otherwise. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14952 16af8721-9629-0410-8352-f15c8da7e697 --- CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51a3852ae..1160836e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -692,11 +692,20 @@ IF(OSG_USE_QT AND NOT ANDROID) IF (DESIRED_QT_VERSION) IF (DESIRED_QT_VERSION MATCHES 5) - FIND_PACKAGE(Qt5Widgets) + + 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) + ENDIF() + + + FIND_PACKAGE(Qt5Widgets) + + ELSEIF (DESIRED_QT_VERSION MATCHES 4) - FIND_PACKAGE(Qt4) + FIND_PACKAGE(Qt4) ELSE() - FIND_PACKAGE(Qt3) + FIND_PACKAGE(Qt3) ENDIF() ELSE()