From ea83d86631bc3fa82a2b9a8f415c2424a8bc1a2a Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 1 Mar 2016 19:55:53 +0100 Subject: [PATCH] Set CMake policy for visibility CMake 3.3+ changed behavior for handling visibility for target types other than dynamic libraries. This commit adds a cmake_policy call to allow the new behavior, removing a dev warning in the process. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7268dac1..aa0b4923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,6 +131,11 @@ if (CMAKE_MAJOR_VERSION GREATER 2) cmake_policy(SET CMP0043 OLD) endif() +# Honor visibility settings for all target types +if (CMAKE_VERSION VERSION_GREATER 3.3) + cmake_policy(SET CMP0063 NEW) +endif() + # Simplify later checks ##################################################################### @@ -231,7 +236,7 @@ if (USE_QT5) PURPOSE "Enable support for the snorenotify framework" ) endif() - + if (WITH_WEBKIT) find_package(Qt5WebKit QUIET) -- 2.20.1