diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-08-01 18:10:36 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-08-02 08:06:09 +0000 |
commit | 1eff54864642c459263de9653e26d9f56af04ce9 (patch) | |
tree | 7dce149858243c62fcb325b2bffba58536a970f4 /examples | |
parent | de5db8cfb87f7c54fddd6d9ecc124cd33201de2a (diff) | |
download | qbs-1eff54864642c459263de9653e26d9f56af04ce9.tar.gz |
Do not access the bundle module unconditionally
It is a mistake that the NativeBinary item currently pulls in the bundle
module unconditionally (and also that the module is enabled everywhere).
We want to change that. Prepare for the change by removing all
unconditional accesses to the module's properties.
Change-Id: If57b8222c1a0e2b09c33520882446fa71401f1f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/code-generator/code-generator.qbs | 2 | ||||
-rw-r--r-- | examples/install-bundle/install-bundle.qbs | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/examples/code-generator/code-generator.qbs b/examples/code-generator/code-generator.qbs index f242fb61e..b9aef12b6 100644 --- a/examples/code-generator/code-generator.qbs +++ b/examples/code-generator/code-generator.qbs @@ -40,8 +40,8 @@ Project { // A code generator that outputs a "Hello World" C++ program. CppApplication { name: "hwgen" + consoleApplication: true files: ["hwgen.cpp"] - bundle.isBundle: false } // Generate and build a hello-world application. diff --git a/examples/install-bundle/install-bundle.qbs b/examples/install-bundle/install-bundle.qbs index 5659f3c72..3151f5517 100644 --- a/examples/install-bundle/install-bundle.qbs +++ b/examples/install-bundle/install-bundle.qbs @@ -8,7 +8,8 @@ Project { Depends { name: "Qt"; submodules: ["core", "gui", "widgets"] } name: "window" - targetName: bundle.isBundle ? "Window" : "window" + property bool isBundle: qbs.targetOS.contains("darwin") && bundle.isBundle + targetName: isBundle ? "Window" : "window" files: [ "main.cpp", "assetcatalog1.xcassets", @@ -19,9 +20,9 @@ Project { ] Group { - fileTagsFilter: bundle.isBundle ? ["bundle.content"] : ["application"] + fileTagsFilter: isBundle ? ["bundle.content"] : ["application"] qbs.install: true - qbs.installDir: bundle.isBundle ? "Applications" : (qbs.targetOS.contains("windows") ? "" : "bin") + qbs.installDir: isBundle ? "Applications" : (qbs.targetOS.contains("windows") ? "" : "bin") qbs.installSourceBase: product.buildDirectory } } @@ -30,13 +31,14 @@ Project { Depends { name: "cpp" } name: "coreutils" - targetName: bundle.isBundle ? "CoreUtils" : "coreutils" + property bool isBundle: qbs.targetOS.contains("darwin") && bundle.isBundle + targetName: isBundle ? "CoreUtils" : "coreutils" files: ["coreutils.cpp", "coreutils.h"] Group { - fileTagsFilter: bundle.isBundle ? ["bundle.content"] : ["dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_import"] + fileTagsFilter: isBundle ? ["bundle.content"] : ["dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_import"] qbs.install: true - qbs.installDir: bundle.isBundle ? "Library/Frameworks" : (qbs.targetOS.contains("windows") ? "" : "lib") + qbs.installDir: isBundle ? "Library/Frameworks" : (qbs.targetOS.contains("windows") ? "" : "lib") qbs.installSourceBase: product.buildDirectory } } |