diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-05-17 10:50:51 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-06-08 08:46:00 +0000 |
commit | a0f956f0509a68d7eaec718bed294661bca49996 (patch) | |
tree | f3ff7d1b0063f3ade80db26ca1b5b844a5c34167 /qtcreator.qbs | |
parent | db9437c2e83ec11befa855e4806ac7920d1a5800 (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 'qtcreator.qbs')
-rw-r--r-- | qtcreator.qbs | 55 |
1 files changed, 5 insertions, 50 deletions
diff --git a/qtcreator.qbs b/qtcreator.qbs index 263479f0dd..c481bb1685 100644 --- a/qtcreator.qbs +++ b/qtcreator.qbs @@ -7,59 +7,12 @@ Project { minimumQbsVersion: "1.5.0" property bool withAutotests: qbs.buildVariant === "debug" property string licenseType: "opensource" - property string ide_version_major: '4' - property string ide_version_minor: '0' - property string ide_version_release: '82' - property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release - property string ide_compat_version_major: '4' - property string ide_compat_version_minor: '0' - property string ide_compat_version_release: '82' - property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release property path ide_source_tree: path - property string ide_app_path: qbs.targetOS.contains("osx") ? "" : "bin" - property string ide_app_target: qbs.targetOS.contains("osx") ? "Qt Creator" : "qtcreator" property pathList additionalPlugins: [] property pathList additionalLibs: [] property pathList additionalTools: [] property pathList additionalAutotests: [] property string sharedSourcesDir: path + "/src/shared" - property string libDirName: "lib" - property string ide_library_path: { - if (qbs.targetOS.contains("osx")) - return ide_app_target + ".app/Contents/Frameworks" - else if (qbs.targetOS.contains("windows")) - return ide_app_path - else - return libDirName + "/qtcreator" - } - property string ide_plugin_path: { - if (qbs.targetOS.contains("osx")) - return ide_app_target + ".app/Contents/PlugIns" - else if (qbs.targetOS.contains("windows")) - return libDirName + "/qtcreator/plugins" - else - return ide_library_path + "/plugins" - } - property string ide_data_path: qbs.targetOS.contains("osx") - ? ide_app_target + ".app/Contents/Resources" - : "share/qtcreator" - property string ide_libexec_path: qbs.targetOS.contains("osx") - ? ide_data_path : qbs.targetOS.contains("windows") - ? ide_app_path - : "libexec/qtcreator" - property string ide_doc_path: qbs.targetOS.contains("osx") - ? ide_data_path + "/doc" - : "share/doc/qtcreator" - property string ide_bin_path: qbs.targetOS.contains("osx") - ? ide_app_target + ".app/Contents/MacOS" - : ide_app_path - property bool testsEnabled: Environment.getEnv("TEST") || qbs.buildVariant === "debug" - property stringList generalDefines: [ - "QT_CREATOR", - 'IDE_LIBRARY_BASENAME="' + libDirName + '"', - "QT_NO_CAST_TO_ASCII", - "QT_RESTRICTED_CAST_FROM_ASCII" - ].concat(testsEnabled ? ["WITH_TESTS"] : []) qbsSearchPaths: "qbs" references: [ @@ -72,6 +25,7 @@ Project { AutotestRunner { Depends { name: "Qt.core" } + Depends { name: "qtc" } environment: { var env = base; if (!qbs.hostOS.contains("windows") || !qbs.targetOS.contains("windows")) @@ -85,9 +39,10 @@ Project { } var fullQtcInstallDir = FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix, qbs.InstallDir); - var fullLibInstallDir = FileInfo.joinPaths(fullQtcInstallDir, project.ide_library_path); - var fullPluginInstallDir - = FileInfo.joinPaths(fullQtcInstallDir, project.ide_plugin_path); + var fullLibInstallDir = FileInfo.joinPaths(fullQtcInstallDir, + product.moduleProperty("ide", "ide_library_path")); + var fullPluginInstallDir = FileInfo.joinPaths(fullQtcInstallDir, + product.moduleProperty("qtc", "ide_plugin_path")); path = Qt.core.binPath + ";" + fullLibInstallDir + ";" + fullPluginInstallDir + ";" + path; var arrayElem = "PATH=" + path; |