From 1eff54864642c459263de9653e26d9f56af04ce9 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 1 Aug 2017 18:10:36 +0200 Subject: 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 --- examples/code-generator/code-generator.qbs | 2 +- examples/install-bundle/install-bundle.qbs | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'examples') 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 } } -- cgit v1.2.3