summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-06-12 20:07:42 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-06-12 22:34:21 +0200
commitde29af76639268f354c74eb6db4e8c85ae180a0d (patch)
treea8de021ea240758285499fd0ef0fbb2be869f83f /cmake
parent6a47e1c4ee8fab26a2ceac5fc6c452b8de0e1bff (diff)
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 <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake5
-rw-r--r--cmake/QtInternalTargets.cmake6
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 $<$<NOT:$<CONFIG:Debug>>: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.