From 47fd0423ec1e3dade5a7e51eb2e314089bc13b86 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 14 Jul 2015 13:33:12 +0000 Subject: [PATCH] Moved the cmake_policy(SET CMP0043 NEW) to work for all script paths that Qt5 usage could pass through. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14953 16af8721-9629-0410-8352-f15c8da7e697 --- CMakeLists.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1160836e8..5b66f13f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -692,16 +692,7 @@ IF(OSG_USE_QT AND NOT ANDROID) IF (DESIRED_QT_VERSION) IF (DESIRED_QT_VERSION MATCHES 5) - - 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) ELSE() @@ -737,6 +728,11 @@ IF(OSG_USE_QT AND NOT ANDROID) #If we have found Qt5, let's try to top off by getting the webkit as well IF ( Qt5Widgets_FOUND ) 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) + ENDIF() ENDIF() ENDIF()