aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2016-05-17 10:50:51 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2016-06-08 08:46:00 +0000
commita0f956f0509a68d7eaec718bed294661bca49996 (patch)
treef3ff7d1b0063f3ade80db26ca1b5b844a5c34167 /src/app
parentdb9437c2e83ec11befa855e4806ac7920d1a5800 (diff)
qbs build: Introduce new module "qtc".
The qtc module gathers properties that used to live in the top-level project file. This is the first step towards making it possible to build plugins against an installed Qt Creator ("out of source build"). Change-Id: Ia1514cc9c888e80be01b308e908de48980fcbdb8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.qbs9
-rw-r--r--src/app/app_version_header.qbs14
2 files changed, 15 insertions, 8 deletions
diff --git a/src/app/app.qbs b/src/app/app.qbs
index 5d8d0de0965..5d60404680a 100644
--- a/src/app/app.qbs
+++ b/src/app/app.qbs
@@ -18,14 +18,15 @@ QtcProduct {
consoleApplication: false
type: ["application"]
- name: project.ide_app_target
- version: project.qtcreator_version
+ name: "qtcreator"
+ targetName: qtc.ide_app_target
+ version: qtc.qtcreator_version
- installDir: project.ide_bin_path
+ installDir: qtc.ide_bin_path
property bool qtcRunnable: true
cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/../Frameworks"]
- : ["$ORIGIN/../" + project.libDirName + "/qtcreator"]
+ : ["$ORIGIN/../" + qtc.libDirName + "/qtcreator"]
cpp.includePaths: [
project.sharedSourcesDir + "/qtsingleapplication",
project.sharedSourcesDir + "/qtlockedfile",
diff --git a/src/app/app_version_header.qbs b/src/app/app_version_header.qbs
index 891cf3974cf..1774fec969d 100644
--- a/src/app/app_version_header.qbs
+++ b/src/app/app_version_header.qbs
@@ -6,6 +6,8 @@ Product {
type: "hpp"
files: "app_version.h.in"
+ Depends { name: "qtc" }
+
Transformer {
inputs: ["app_version.h.in"]
Artifact {
@@ -26,10 +28,14 @@ Product {
if (onWindows)
content = content.replace(/\r\n/g, "\n");
// replace the magic qmake incantations
- content = content.replace(/(\n#define IDE_VERSION) .+\n/, "$1 " + project.qtcreator_version + "\n");
- content = content.replace(/(\n#define IDE_VERSION_MAJOR) .+\n/, "$1 " + project.ide_version_major + "\n")
- content = content.replace(/(\n#define IDE_VERSION_MINOR) .+\n/, "$1 " + project.ide_version_minor + "\n")
- content = content.replace(/(\n#define IDE_VERSION_RELEASE) .+\n/, "$1 " + project.ide_version_release + "\n")
+ content = content.replace(/(\n#define IDE_VERSION) .+\n/, "$1 "
+ + product.moduleProperty("qtc", "qtcreator_version") + "\n");
+ content = content.replace(/(\n#define IDE_VERSION_MAJOR) .+\n/, "$1 "
+ + product.moduleProperty("qtc", "ide_version_major") + "\n");
+ content = content.replace(/(\n#define IDE_VERSION_MINOR) .+\n/, "$1 "
+ + product.moduleProperty("qtc", "ide_version_minor") + "\n");
+ content = content.replace(/(\n#define IDE_VERSION_RELEASE) .+\n/, "$1 "
+ + product.moduleProperty("qtc", "ide_version_release") + "\n");
file = new TextFile(output.filePath, TextFile.WriteOnly);
file.truncate();
file.write(content);