Commit c8881e7c authored by Christian Kandeler's avatar Christian Kandeler

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: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent d14676dc
......@@ -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")
}
......
......@@ -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"
......
......@@ -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")))
......
......@@ -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 {
......
......@@ -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
......
Subproject commit 0816b8e476d20e00cbcffd1e71162adf93e85658
Subproject commit 3e746e4741513dabf60f43efab938d8fc94cd1be
......@@ -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",
......
......@@ -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
......
......@@ -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: []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment