aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2013-10-21 19:09:12 -0400
committerJake Petroules <jake.petroules@petroules.com>2013-10-22 16:10:44 +0200
commit1b2f39da7da66f9ea5a4dc163ae5835dd722eccf (patch)
tree2a4a2d6e6abc31076a66bafce7e6682b0d1950a1
parentfbe28faf9898f4ded5e9e5e21054891954e4bdd1 (diff)
Move a number of cpp module properties to the base module.
Task-number: QBS-409 Change-Id: I7cd6942626e2543e8e4f75ee10f499d8f1f25e81 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--share/qbs/modules/cpp/CppModule.qbs17
-rw-r--r--share/qbs/modules/cpp/DarwinGCC.qbs37
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs2
-rw-r--r--share/qbs/modules/cpp/ios-gcc.qbs3
4 files changed, 31 insertions, 28 deletions
diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs
index e9bf4bcd6..4b6ec8870 100644
--- a/share/qbs/modules/cpp/CppModule.qbs
+++ b/share/qbs/modules/cpp/CppModule.qbs
@@ -92,6 +92,7 @@ Module {
property string dynamicLibrarySuffix
property stringList supportedStaticLibrarySuffixes: [staticLibrarySuffix]
property string executableSuffix
+ property bool createSymlinks: true
property stringList dynamicLibraries // list of names, will be linked with -lname
property stringList staticLibraries // list of static library files
property stringList frameworks // list of frameworks, will be linked with '-framework <name>'
@@ -161,6 +162,22 @@ Module {
property stringList platformObjcxxFlags
property stringList platformLinkerFlags
+ // OS X and iOS properties
+ property path infoPlistFile
+ property var infoPlist
+ property bool processInfoPlist: true
+ property string infoPlistFormat: {
+ if (qbs.targetOS.contains("osx"))
+ return infoPlistFile ? "same-as-input" : "xml1"
+ else if (qbs.targetOS.contains("ios"))
+ return "binary1"
+ }
+ property bool buildDsym: qbs.buildVariant === "release"
+ property bool buildIpa: !qbs.targetOS.contains('ios-simulator')
+
+ property string signingIdentity
+ property string provisionFile
+
FileTagger {
pattern: "*.c"
fileTags: ["c"]
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs
index bdcaa2082..381174d78 100644
--- a/share/qbs/modules/cpp/DarwinGCC.qbs
+++ b/share/qbs/modules/cpp/DarwinGCC.qbs
@@ -13,29 +13,6 @@ UnixGCC {
compilerDefines: ["__GNUC__", "__APPLE__"]
dynamicLibrarySuffix: ".dylib"
- property path infoPlistFile
- property var infoPlist
- property bool processInfoPlist: true
- property string infoPlistFormat: {
- if (qbs.targetOS.contains("osx"))
- return infoPlistFile ? "same-as-input" : "xml1"
- else if (qbs.targetOS.contains("ios"))
- return "binary1"
- }
- property bool buildDsym: qbs.buildVariant === "release"
- property var buildEnv: {
- var env = {
- "EXECUTABLE_NAME": product.targetName,
- "LANG": "en_US.US-ASCII",
- "PRODUCT_NAME": product.name
- }
- if (minimumIosVersion)
- env["IPHONEOS_DEPLOYMENT_TARGET"] = minimumIosVersion;
- if (minimumOsxVersion)
- env["MACOSX_DEPLOYMENT_TARGET"] = minimumOsxVersion;
- return env;
- }
-
setupBuildEnvironment: {
var v = new ModUtils.EnvironmentVariable("PATH", ":", false);
if (platformPath) {
@@ -54,6 +31,20 @@ UnixGCC {
}
}
+ // private properties
+ readonly property var buildEnv: {
+ var env = {
+ "EXECUTABLE_NAME": product.targetName,
+ "LANG": "en_US.US-ASCII",
+ "PRODUCT_NAME": product.name
+ }
+ if (minimumIosVersion)
+ env["IPHONEOS_DEPLOYMENT_TARGET"] = minimumIosVersion;
+ if (minimumOsxVersion)
+ env["MACOSX_DEPLOYMENT_TARGET"] = minimumOsxVersion;
+ return env;
+ }
+
readonly property var defaultInfoPlist: {
var dict = {
CFBundleDevelopmentRegion: "en", // default localization
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 85e33d120..9445919e4 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -32,8 +32,6 @@ CppModule {
compilerPath: toolchainPathPrefix + compilerName
property path archiverPath: { return toolchainPathPrefix + archiverName }
- property bool createSymlinks: true
-
readonly property bool shouldCreateSymlinks: {
return createSymlinks && product.version &&
!product.type.contains("frameworkbundle") && qbs.targetOS.contains("unix");
diff --git a/share/qbs/modules/cpp/ios-gcc.qbs b/share/qbs/modules/cpp/ios-gcc.qbs
index d685939a9..2ea1adcd9 100644
--- a/share/qbs/modules/cpp/ios-gcc.qbs
+++ b/share/qbs/modules/cpp/ios-gcc.qbs
@@ -8,9 +8,6 @@ import 'bundle-tools.js' as BundleTools
DarwinGCC {
condition: qbs.hostOS.contains('osx') && qbs.targetOS.contains('ios') && qbs.toolchain.contains('gcc')
- property string signingIdentity
- property string provisionFile
- property bool buildIpa: !qbs.targetOS.contains('ios-simulator')
visibility: "hidden"
optimization: {
if (qbs.buildVariant === "debug")