From ed5543475e614cc1b1eb3fbee6a635805bb6c805 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 13 Apr 2021 19:29:45 +0200 Subject: CMake: Fix hardcoded iOS SDK when finding OpenGLES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- cmake/FindGLESv2.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake') 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. -- cgit v1.2.3