From 1c833e2e4d26e82082b2335af46ee02eb8675e35 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 17 Jul 2015 08:17:34 +0000 Subject: [PATCH] Added cmake_policy setting for cmake-3.x to avoid warning with Qt usage. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14972 16af8721-9629-0410-8352-f15c8da7e697 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 110a7900e..122be9b92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -618,6 +618,13 @@ 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) + 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() ENDIF()