summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-04-13 19:29:45 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-04-15 00:07:51 +0200
commited5543475e614cc1b1eb3fbee6a635805bb6c805 (patch)
treed99ac4d0f0f1ba66f892ae94e92c755c967b3a87 /cmake
parent1d59fe368a0bd0c04264618e3e6f09d7ce289d33 (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. Pick-to: 6.1 Change-Id: I9bd088f317917544ccfeff61fc4ff90f18f0f3d8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'cmake')
-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.