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>
This commit is contained in:
Alexandru Croitor 2020-06-12 20:07:42 +02:00
parent 6a47e1c4ee
commit de29af7663
2 changed files with 5 additions and 6 deletions

View File

@ -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()

View File

@ -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.