summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-09-09 13:02:38 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-22 01:20:36 +0000
commit3f0fd35f08041ecac08c33543c4580a5927f71c7 (patch)
tree88c4c6f98357d6a59f5cf0bb57d8530c5a846e51 /mkspecs
parentde9f070de790ba425603156eee0b4de23ed6a4db (diff)
qmake: Print error when iOS simulator device could not be found
A qmake project built for iOS-simulator tries to find suitable devices in xcodebuild.mk. If no suitable device could be found, the build failed with xcodebuild: error: missing value for key 'id' of option 'Destination' which isn't that helpful. Detect the situation in xcodebuild.mk and print an error message. Fixes: QTBUG-77222 Change-Id: I02f9ab0dd7b8f234bcd8d0ea387927f31ca092e0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ad4faa25a524da8291525ca0afe2f2a65bf6b456) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/uikit/xcodebuild.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mkspecs/features/uikit/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk
index 84e82477ea..8b98cdfc60 100644
--- a/mkspecs/features/uikit/xcodebuild.mk
+++ b/mkspecs/features/uikit/xcodebuild.mk
@@ -72,7 +72,11 @@ endif
%-device: DEVICES = $(HARDWARE_DEVICES)
GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION)
-GENERIC_SIMULATOR_DESTINATION := "id=$(shell $(MAKEFILE_DIR)devices.py $(EXPORT_DEVICE_FILTER) | tail -n 1)"
+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)"
%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_SIMULATOR_DESTINATION))
%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_DEVICE_DESTINATION))