diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-12-22 13:26:00 +0100 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-10-20 17:02:51 +0000 |
commit | ab28ff2207e8f33754c79793089dbf943d67736d (patch) | |
tree | 8e2d39f0ff69043a2ab601c16fdd6b81ad25b1a1 /mkspecs/features/uikit/xcodebuild.mk | |
parent | 7ff2473dc6926b884b2224389f08ddb21bd231f0 (diff) |
iOS: Use generic simulator device for building apps via xcodebuildv5.15.7-lts-lgpl
If Xcode wasn't configured with any simulators the build would fail
since we had no device to build for. But we don't need to build for
a specific device, we can build for the generic simulator device,
just like we do for the non-simulator build. This likely didn't
work properly at the time it was first implemented, but now seems
to work fine, and is less fragile than the current solution.
Running tests still enumerates the available simulators,
as that needs a concrete device to run on.
Fixes: COIN-777
Change-Id: I50e31c1b350cf83ce348275b467051263dea88a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit cd2690dcbfc79d4bd7146c410a5edbdc477f92b5)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'mkspecs/features/uikit/xcodebuild.mk')
-rw-r--r-- | mkspecs/features/uikit/xcodebuild.mk | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mkspecs/features/uikit/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk index 8b98cdfc60..4416240cf2 100644 --- a/mkspecs/features/uikit/xcodebuild.mk +++ b/mkspecs/features/uikit/xcodebuild.mk @@ -58,7 +58,7 @@ debug-%: CONFIGURATION = Debug MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST))) -# Test and build (device) destinations +# Test device destinations ifneq ($(filter check%,$(MAKECMDGOALS)),) ifeq ($(DEVICES),) $(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...) @@ -72,14 +72,10 @@ endif %-device: DEVICES = $(HARDWARE_DEVICES) GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION) -GENERIC_SIMULATOR_DESTINATION := $(shell $(MAKEFILE_DIR)devices.py $(EXPORT_DEVICE_FILTER) | tail -n 1) -ifeq ($(GENERIC_SIMULATOR_DESTINATION),) - $(error Could not find any device matching '$(EXPORT_DEVICE_FILTER)'.) -endif -GENERIC_SIMULATOR_DESTINATION := "id=$(GENERIC_SIMULATOR_DESTINATION)" +GENERIC_SIMULATOR_DESTINATION := $(EXPORT_GENERIC_SIMULATOR_DESTINATION) -%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_SIMULATOR_DESTINATION)) -%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_DEVICE_DESTINATION)) +%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)","$(GENERIC_SIMULATOR_DESTINATION)") +%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)","$(GENERIC_DEVICE_DESTINATION)") XCODE_VERSION_MAJOR := $(shell xcodebuild -version | grep Xcode | sed -e 's/Xcode //' | sed -e 's/\..*//') |