aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-12-16 10:05:05 +0100
committerIvan Komissarov <ABBAPOH@gmail.com>2021-01-04 12:57:45 +0000
commit8621465db2c7fa10eb014ef14d55ec7dd3e085a0 (patch)
treea52b50c52967c323cba20f175cbc2acb82c74833 /share/qbs/modules
parent297ab225ed2ce32a8b64fb7b693fe73cb82e8dc7 (diff)
Xcode: Fix XCode auto-detection
If Xcode is moved to another location, we should use xcode-select -- print-path to find it rather than using hardcoded path. Change-Id: I9b5eba19c9e732e5e9da0322320fb0406249e020 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules')
-rw-r--r--share/qbs/modules/xcode/xcode.qbs9
1 files changed, 8 insertions, 1 deletions
diff --git a/share/qbs/modules/xcode/xcode.qbs b/share/qbs/modules/xcode/xcode.qbs
index e4df1f20b..aeb0760ac 100644
--- a/share/qbs/modules/xcode/xcode.qbs
+++ b/share/qbs/modules/xcode/xcode.qbs
@@ -12,6 +12,11 @@ import 'xcode.js' as Xcode
Module {
id: xcodeModule
+ Probes.XcodeLocationProbe {
+ id: xcodeLocationProbe
+ condition: !xcodeModule.developerPath
+ }
+
Probes.XcodeProbe {
id: xcodeProbe
developerPath: xcodeModule.developerPath
@@ -27,7 +32,9 @@ Module {
version: xcodeProbe.xcodeVersion
- property path developerPath: "/Applications/Xcode.app/Contents/Developer"
+ property path developerPath: xcodeLocationProbe.found
+ ? xcodeLocationProbe.developerPath
+ : undefined
property string sdk: DarwinTools.applePlatformName(qbs.targetOS, platformType)
property stringList targetDevices: DarwinTools.targetDevices(qbs.targetOS)