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/branches/OpenSceneGraph-3.4@14954 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-07-14 13:33:17 +00:00
parent 5acad4e07e
commit 5ebfa0a71e

View File

@@ -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_<Config> 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_<Config> properties." warnings
cmake_policy(SET CMP0043 NEW)
ENDIF()
ENDIF()
ENDIF()