aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-06-09 23:48:35 -0700
committerJake Petroules <jake.petroules@petroules.com>2015-07-29 19:17:07 +0000
commite8963d2a2ff314355ec6a44df2647eb84eda634f (patch)
treebba83ecbc2583f9656eafa5ad192fc27f1375a16 /share/qbs/modules/cpp
parentc50827bf53e3863adcfd8c0e38aa5b7773eb075f (diff)
Introduce Xcode module.
Change-Id: I3d338b1f3a41bb4c19e0c3c213139e09493ae10b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'share/qbs/modules/cpp')
-rw-r--r--share/qbs/modules/cpp/CppModule.qbs3
-rw-r--r--share/qbs/modules/cpp/DarwinGCC.qbs28
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs1
-rw-r--r--share/qbs/modules/cpp/ios-gcc.qbs2
-rw-r--r--share/qbs/modules/cpp/osx-gcc.qbs2
5 files changed, 8 insertions, 28 deletions
diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs
index 62b6659aa..3443f1c7b 100644
--- a/share/qbs/modules/cpp/CppModule.qbs
+++ b/share/qbs/modules/cpp/CppModule.qbs
@@ -244,9 +244,6 @@ Module {
property string signingIdentity
property path provisioningProfile
- property string xcodeSdkName
- property string xcodeSdkVersion
-
property bool automaticReferenceCounting
PropertyOptions {
name: "automaticReferenceCounting"
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs
index 43ea72bc5..05e40d9d3 100644
--- a/share/qbs/modules/cpp/DarwinGCC.qbs
+++ b/share/qbs/modules/cpp/DarwinGCC.qbs
@@ -29,11 +29,14 @@
****************************************************************************/
import qbs
+import qbs.FileInfo
import qbs.ModUtils
UnixGCC {
condition: false
+ Depends { name: "xcode"; required: false }
+
compilerDefines: ["__GNUC__", "__APPLE__"]
loadableModulePrefix: ""
loadableModuleSuffix: ".bundle"
@@ -41,26 +44,11 @@ UnixGCC {
separateDebugInformation: true
debugInfoSuffix: ".dSYM"
- validate: {
- if (qbs.sysroot) {
- var validator = new ModUtils.PropertyValidator("cpp");
- validator.setRequiredProperty("xcodeSdkName", xcodeSdkName);
- validator.setRequiredProperty("xcodeSdkVersion", xcodeSdkVersion);
- validator.validate();
- }
- }
+ toolchainInstallPath: xcode.present
+ ? FileInfo.joinPaths(xcode.toolchainPath, "usr", "bin") : base
+ sysroot: xcode.present ? xcode.sdkPath : base
setupBuildEnvironment: {
- var v = new ModUtils.EnvironmentVariable("PATH", ":", false);
- if (platformPath) {
- v.prepend(platformPath + "/Developer/usr/bin");
- var platformPathL = platformPath.split("/");
- platformPathL.pop();
- platformPathL.pop();
- var devPath = platformPathL.join("/")
- v.prepend(devPath + "/usr/bin");
- v.set();
- }
for (var key in buildEnv) {
v = new ModUtils.EnvironmentVariable(key);
v.value = buildEnv[key];
@@ -113,8 +101,4 @@ UnixGCC {
env["MACOSX_DEPLOYMENT_TARGET"] = minimumOsxVersion;
return env;
}
-
- readonly property path platformInfoPlist: platformPath ? [platformPath, "Info.plist"].join("/") : undefined
- readonly property path sdkSettingsPlist: sysroot ? [sysroot, "SDKSettings.plist"].join("/") : undefined
- readonly property path toolchainInfoPlist: toolchainInstallPath ? [toolchainInstallPath, "../../ToolchainInfo.plist"].join("/") : undefined
}
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 1c7926136..f218434d5 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -58,7 +58,6 @@ CppModule {
property string stripName: "strip"
property string dsymutilName: "dsymutil"
property path sysroot: qbs.sysroot
- property path platformPath
property string exportedSymbolsCheckMode: "ignore-undefined"
PropertyOptions {
diff --git a/share/qbs/modules/cpp/ios-gcc.qbs b/share/qbs/modules/cpp/ios-gcc.qbs
index d087bb6d2..93df91c9c 100644
--- a/share/qbs/modules/cpp/ios-gcc.qbs
+++ b/share/qbs/modules/cpp/ios-gcc.qbs
@@ -39,7 +39,7 @@ DarwinGCC {
qbs.toolchain && qbs.toolchain.contains('gcc')
// Setting a minimum is especially important for Simulator or CC/LD thinks the target is OS X
- minimumIosVersion: xcodeSdkVersion || (cxxStandardLibrary === "libc++" ? "5.0" : undefined)
+ minimumIosVersion: xcode.sdkVersion || (cxxStandardLibrary === "libc++" ? "5.0" : undefined)
platformObjcFlags: base.concat(simulatorObjcFlags)
platformObjcxxFlags: base.concat(simulatorObjcFlags)
diff --git a/share/qbs/modules/cpp/osx-gcc.qbs b/share/qbs/modules/cpp/osx-gcc.qbs
index a9263ec36..83246f509 100644
--- a/share/qbs/modules/cpp/osx-gcc.qbs
+++ b/share/qbs/modules/cpp/osx-gcc.qbs
@@ -36,5 +36,5 @@ DarwinGCC {
qbs.targetOS.contains('osx') &&
qbs.toolchain && qbs.toolchain.contains('gcc')
- minimumOsxVersion: xcodeSdkVersion || (cxxStandardLibrary === "libc++" ? "10.7" : undefined)
+ minimumOsxVersion: xcode.sdkVersion || (cxxStandardLibrary === "libc++" ? "10.7" : undefined)
}