diff options
Diffstat (limited to 'share/qbs/modules/qbs/common.qbs')
-rw-r--r-- | share/qbs/modules/qbs/common.qbs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs index 4b146c542..ca578524d 100644 --- a/share/qbs/modules/qbs/common.qbs +++ b/share/qbs/modules/qbs/common.qbs @@ -51,7 +51,7 @@ Module { property string optimization: (buildVariant == "debug" ? "none" : "fast") readonly property stringList hostOS: undefined // set internally property string hostOSVersion: { - if (hostOS && hostOS.contains("osx")) { + if (hostOS && hostOS.contains("macos")) { return Utilities.getNativeSetting("/System/Library/CoreServices/ServerVersion.plist", "ProductVersion") || Utilities.getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductVersion"); } else if (hostOS && hostOS.contains("windows")) { @@ -61,7 +61,7 @@ Module { } property string hostOSBuildVersion: { - if (hostOS.contains("osx")) { + if (hostOS.contains("macos")) { return Utilities.getNativeSetting("/System/Library/CoreServices/ServerVersion.plist", "ProductBuildVersion") || Utilities.getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductBuildVersion"); } else if (hostOS.contains("windows")) { @@ -105,7 +105,13 @@ Module { var validator = new ModUtils.PropertyValidator("qbs"); validator.setRequiredProperty("hostOS", hostOS); validator.setRequiredProperty("targetOS", targetOS); - if (hostOS && (hostOS.contains("windows") || hostOS.contains("osx"))) { + validator.addCustomValidator("targetOS", targetOS, function (value) { + if (!value || (value.contains("osx") && !value.contains("macos"))) + return false; + return true; + }, "the value 'osx' has been replaced by 'macos'; use that instead and update " + + "hostOS and targetOS condition checks in your project accordingly"); + if (hostOS && (hostOS.contains("windows") || hostOS.contains("macos"))) { validator.setRequiredProperty("hostOSVersion", hostOSVersion, "could not detect host operating system version; " + "verify that system files and registry keys have not " + @@ -170,7 +176,7 @@ Module { env[windowsPathVariable] = PathTools.prependOrSetPath(newEntry, env[windowsPathVariable], qbs.pathListSeparator); - } else if (hostOS.contains("osx") && targetOS.contains("osx")) { + } else if (hostOS.contains("macos") && targetOS.contains("macos")) { env["DYLD_FRAMEWORK_PATH"] = PathTools.prependOrSetPath([ FileInfo.joinPaths(installRoot, installPrefix, "Library", "Frameworks"), FileInfo.joinPaths(installRoot, installPrefix, "lib"), |