summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-04-13 19:29:45 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-15 02:33:57 +0000
commit0ba9a4f832e87b0709ab781bb19fcba003cfc043 (patch)
tree61a7c8a9d2706a8b0961f9c320292454b8583f6e
parentc735d03d444a345c5e45622cfd38e6f429b56654 (diff)
CMake: Fix hardcoded iOS SDK when finding OpenGLES
The find script checked for UIKIT which is set during a Qt build in QtPlaformSupport.cmake but is not set when building a user project. This casused the find script to skip the iOS specific code that passed the -framework OpenGLES linker flag. This broke SDK switching in Xcode. Check the IOS variable instead which is set by CMake for all projects that pass -DCMAKE_SYSTEM_NAME=iOS. Change-Id: I9bd088f317917544ccfeff61fc4ff90f18f0f3d8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ed5543475e614cc1b1eb3fbee6a635805bb6c805) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/FindGLESv2.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/FindGLESv2.cmake b/cmake/FindGLESv2.cmake
index 56298c7773..8f3cbad5c1 100644
--- a/cmake/FindGLESv2.cmake
+++ b/cmake/FindGLESv2.cmake
@@ -60,9 +60,9 @@ find_package_handle_standard_args(GLESv2 DEFAULT_MSG ${package_args})
mark_as_advanced(${package_args})
if(GLESv2_FOUND AND NOT TARGET GLESv2::GLESv2)
- if(EMSCRIPTEN OR UIKIT)
+ if(EMSCRIPTEN OR IOS)
add_library(GLESv2::GLESv2 INTERFACE IMPORTED)
- if(UIKIT)
+ if(IOS)
# For simulator_and_device builds we can't specify the full library path, because
# it's specific to either the device or the simulator. Resort to passing a link
# flag instead.