diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-02-27 18:18:54 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-02-28 17:38:41 +0100 |
commit | c8881e7ca2fc7249b5c88e7c485913f0df7a7c05 (patch) | |
tree | f5ec825ff498ddbf1ab89bfefd293844281fcf73 | |
parent | d14676dc10699bef81ad04df1a199076884c2b65 (diff) | |
download | qt-creator-c8881e7ca2fc7249b5c88e7c485913f0df7a7c05.tar.gz |
Support configurable library location in qbs build.
And also in the qbs sub-project (for the qbs and qmake builds). This
becomes possible with the qbs submodule update that is part of this
patch.
Change-Id: I8347a8c04a52bcb0682f32d808fb61a90ef3ba72
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r-- | qtcreator.pro | 5 | ||||
-rw-r--r-- | qtcreator.qbs | 7 | ||||
-rw-r--r-- | src/app/app.qbs | 2 | ||||
-rw-r--r-- | src/plugins/cpaster/frontend/frontend.qbs | 6 | ||||
-rw-r--r-- | src/plugins/qbsprojectmanager/qbsproject.cpp | 2 | ||||
m--------- | src/shared/qbs | 0 | ||||
-rw-r--r-- | src/src.qbs | 2 | ||||
-rw-r--r-- | tests/auto/autotest.qbs | 3 | ||||
-rw-r--r-- | tests/auto/extensionsystem/plugin.qbs | 4 |
9 files changed, 17 insertions, 14 deletions
diff --git a/qtcreator.pro b/qtcreator.pro index 1e250446d5..cc0c0db48b 100644 --- a/qtcreator.pro +++ b/qtcreator.pro @@ -43,8 +43,9 @@ exists(src/shared/qbs/qbs.pro) { system("echo QBS_LIB_INSTALL_DIR = $${QTC_PREFIX}/$${IDE_LIBRARY_BASENAME}/qtcreator >> $$qmake_cache") system("echo QBS_RESOURCES_BUILD_DIR = $${maybe_backslash}\"$${IDE_DATA_PATH}/qbs$${maybe_backslash}\" >> $$qmake_cache") system("echo QBS_RESOURCES_INSTALL_DIR = $${QTC_PREFIX}/share/qtcreator/qbs >> $$qmake_cache") - system("echo QBS_PLUGINS_BUILD_DIR = $${maybe_backslash}\"$${IDE_BUILD_TREE}/lib/qtcreator/$${maybe_backslash}\" >> $$qmake_cache") - system("echo QBS_PLUGINS_INSTALL_DIR = $${QTC_PREFIX}/lib/qtcreator >> $$qmake_cache") + system("echo QBS_PLUGINS_BUILD_DIR = $${maybe_backslash}\"$${IDE_BUILD_TREE}/$${IDE_LIBRARY_BASENAME}/qtcreator/$${maybe_backslash}\" >> $$qmake_cache") + system("echo QBS_PLUGINS_INSTALL_DIR = $${QTC_PREFIX}/$${IDE_LIBRARY_BASENAME}/qtcreator >> $$qmake_cache") + system("echo QBS_LIBRARY_DIRNAME = $${IDE_LIBRARY_BASENAME} >> $$qmake_cache") system("echo CONFIG += qbs_no_dev_install >> $$qmake_cache") } diff --git a/qtcreator.qbs b/qtcreator.qbs index 6228a1b53d..638faa134c 100644 --- a/qtcreator.qbs +++ b/qtcreator.qbs @@ -16,19 +16,20 @@ Project { property pathList additionalPlugins: [] property pathList additionalLibs: [] property pathList additionalTools: [] + property string libDirName: "lib" property string ide_library_path: { if (qbs.targetOS.contains("osx")) return ide_app_target + ".app/Contents/PlugIns" else if (qbs.targetOS.contains("windows")) return ide_app_path else - return "lib/qtcreator" + return libDirName + "/qtcreator" } property string ide_plugin_path: { if (qbs.targetOS.contains("osx")) return ide_library_path else if (qbs.targetOS.contains("windows")) - return "lib/qtcreator/plugins" + return libDirName + "/qtcreator/plugins" else return ide_library_path + "/plugins" } @@ -47,7 +48,7 @@ Project { property bool testsEnabled: qbs.getenv("TEST") || qbs.buildVariant === "debug" property stringList generalDefines: [ "QT_CREATOR", - 'IDE_LIBRARY_BASENAME="lib"', + 'IDE_LIBRARY_BASENAME="' + libDirName + '"', "QT_DISABLE_DEPRECATED_BEFORE=0x040900", "QT_NO_CAST_TO_ASCII", "QT_NO_CAST_FROM_ASCII" diff --git a/src/app/app.qbs b/src/app/app.qbs index aebc44643e..844536ab13 100644 --- a/src/app/app.qbs +++ b/src/app/app.qbs @@ -5,7 +5,7 @@ Application { consoleApplication: qbs.debugInformation cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/.."] - : ["$ORIGIN/../lib/qtcreator"] + : ["$ORIGIN/../" + project.libDirName + "/qtcreator"] cpp.defines: project.generalDefines cpp.linkerFlags: { if (qbs.buildVariant == "release" && (qbs.toolchain.contains("gcc") || qbs.toolchain.contains("mingw"))) diff --git a/src/plugins/cpaster/frontend/frontend.qbs b/src/plugins/cpaster/frontend/frontend.qbs index ba7d8a378b..e425a88560 100644 --- a/src/plugins/cpaster/frontend/frontend.qbs +++ b/src/plugins/cpaster/frontend/frontend.qbs @@ -12,9 +12,9 @@ QtcTool { Depends { name: "CppTools" } cpp.rpaths: [ - "$ORIGIN/../lib/qtcreator", - "$ORIGIN/../lib/qtcreator/plugins", - "$ORIGIN/../lib/qtcreator/plugins/QtProject" + "$ORIGIN/../" + project.libDirName + "/qtcreator", + "$ORIGIN/../" + project.libDirName + "/qtcreator/plugins", + "$ORIGIN/../" + project.libDirName + "/qtcreator/plugins/QtProject" ] Group { diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index f1b43da8ac..a9c2b3fe26 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -727,7 +727,7 @@ QString QbsProject::pluginsBaseDirectory() const if (!qbsInstallDir.isEmpty()) return qbsInstallDir + QLatin1String("/lib/"); return QDir::cleanPath(QCoreApplication::applicationDirPath() - + QLatin1String("/../lib/qtcreator")); + + QLatin1String("/../" IDE_LIBRARY_BASENAME "/qtcreator")); } } // namespace Internal diff --git a/src/shared/qbs b/src/shared/qbs -Subproject 0816b8e476d20e00cbcffd1e71162adf93e8565 +Subproject 3e746e4741513dabf60f43efab938d8fc94cd1b diff --git a/src/src.qbs b/src/src.qbs index d7ba55a39a..bca1658abf 100644 --- a/src/src.qbs +++ b/src/src.qbs @@ -27,7 +27,7 @@ Project { property path libRPaths: qbs.targetOS.contains("osx") ? ["@loader_path/.."] : ["$ORIGIN/.."] property path resourcesInstallDir: project.ide_data_path + "/qbs" - property string pluginsInstallDir: "lib/qtcreator" + property string pluginsInstallDir: project.libDirName + "/qtcreator" references: [ qbsBaseDir + "/src/lib/libs.qbs", diff --git a/tests/auto/autotest.qbs b/tests/auto/autotest.qbs index 9625b10b29..fb4985a765 100644 --- a/tests/auto/autotest.qbs +++ b/tests/auto/autotest.qbs @@ -21,7 +21,8 @@ CppApplication { // absolute paths to resources in the build directory. // cpp.rpaths: qbs.targetOS.contains("osx") // ? ["@executable_path/.."] -// : ["$ORIGIN/../lib/qtcreator", "$ORIGIN/../lib/qtcreator/plugins/QtProject"] +// : ["$ORIGIN/../" + project.libDirName + "/qtcreator", +// "$ORIGIN/../" project.libDirName + "/qtcreator/plugins/QtProject"] // Group { // fileTagsFilter: product.type // qbs.install: true diff --git a/tests/auto/extensionsystem/plugin.qbs b/tests/auto/extensionsystem/plugin.qbs index 829ed3a6de..c6ccbe7566 100644 --- a/tests/auto/extensionsystem/plugin.qbs +++ b/tests/auto/extensionsystem/plugin.qbs @@ -11,8 +11,8 @@ DynamicLibrary { targetName: QtcFunctions.qtLibraryName(qbs, name.split('_')[1]) destinationDirectory: FileInfo.relativePath(project.ide_source_tree, sourceDirectory) cpp.rpaths: [ - buildDirectory + "/lib/qtcreator", - buildDirectory + "/lib/qtcreator/plugins/QtProject" + buildDirectory + "/" + project.libDirName + "/qtcreator", + buildDirectory + "/" + project.libDirName + "/qtcreator/plugins/QtProject" ].concat(additionalRPaths) property pathList filesToCopy property pathList additionalRPaths: [] |