From de29af76639268f354c74eb6db4e8c85ae180a0d Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 12 Jun 2020 20:07:42 +0200 Subject: [PATCH] CMake: Make GL_SILENCE_DEPRECATION a public define for all consumers In qmake land the define is set in mkspecs/common/macx.conf which means it should be public for all Qt consumer apps as well, not just internal targets. Make it so. Amends 17be43c58ec6fbffee52d2a64038c4744610875a Task-number: QTBUG-83929 Change-Id: I9f9d7dfca24b54977cb8364723c3618d3fec2e73 Reviewed-by: Cristian Adam --- cmake/QtBuild.cmake | 5 +++++ cmake/QtInternalTargets.cmake | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 0778987b6a..cbb46cb8a4 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -286,6 +286,11 @@ elseif(ANDROID) endif() elseif(APPLE) set(QT_QMAKE_TARGET_MKSPEC macx-clang) + if(MACOS) + list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS GL_SILENCE_DEPRECATION) + elseif(UIKIT) + list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS GLES_SILENCE_DEPRECATION) + endif() elseif(EMSCRIPTEN) set(QT_QMAKE_TARGET_MKSPEC wasm-emscripten) endif() diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 68ab141c44..9fca5d41de 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -108,12 +108,6 @@ endif() target_compile_definitions(PlatformCommonInternal INTERFACE $<$>:QT_NO_DEBUG>) -if(MACOS) - target_compile_definitions(PlatformCommonInternal INTERFACE GL_SILENCE_DEPRECATION) -elseif(UIKIT) - target_compile_definitions(PlatformCommonInternal INTERFACE GLES_SILENCE_DEPRECATION) -endif() - if(UIKIT) # Do what mkspecs/features/uikit/default_pre.prf does, aka enable sse2 for # simulator_and_device_builds.