forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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_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_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_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_BUILD_DIR = $${maybe_backslash}\"$${IDE_BUILD_TREE}/$${IDE_LIBRARY_BASENAME}/qtcreator/$${maybe_backslash}\" >> $$qmake_cache")
|
||||||
system("echo QBS_PLUGINS_INSTALL_DIR = $${QTC_PREFIX}/lib/qtcreator >> $$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")
|
system("echo CONFIG += qbs_no_dev_install >> $$qmake_cache")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,19 +16,20 @@ Project {
|
|||||||
property pathList additionalPlugins: []
|
property pathList additionalPlugins: []
|
||||||
property pathList additionalLibs: []
|
property pathList additionalLibs: []
|
||||||
property pathList additionalTools: []
|
property pathList additionalTools: []
|
||||||
|
property string libDirName: "lib"
|
||||||
property string ide_library_path: {
|
property string ide_library_path: {
|
||||||
if (qbs.targetOS.contains("osx"))
|
if (qbs.targetOS.contains("osx"))
|
||||||
return ide_app_target + ".app/Contents/PlugIns"
|
return ide_app_target + ".app/Contents/PlugIns"
|
||||||
else if (qbs.targetOS.contains("windows"))
|
else if (qbs.targetOS.contains("windows"))
|
||||||
return ide_app_path
|
return ide_app_path
|
||||||
else
|
else
|
||||||
return "lib/qtcreator"
|
return libDirName + "/qtcreator"
|
||||||
}
|
}
|
||||||
property string ide_plugin_path: {
|
property string ide_plugin_path: {
|
||||||
if (qbs.targetOS.contains("osx"))
|
if (qbs.targetOS.contains("osx"))
|
||||||
return ide_library_path
|
return ide_library_path
|
||||||
else if (qbs.targetOS.contains("windows"))
|
else if (qbs.targetOS.contains("windows"))
|
||||||
return "lib/qtcreator/plugins"
|
return libDirName + "/qtcreator/plugins"
|
||||||
else
|
else
|
||||||
return ide_library_path + "/plugins"
|
return ide_library_path + "/plugins"
|
||||||
}
|
}
|
||||||
@@ -47,7 +48,7 @@ Project {
|
|||||||
property bool testsEnabled: qbs.getenv("TEST") || qbs.buildVariant === "debug"
|
property bool testsEnabled: qbs.getenv("TEST") || qbs.buildVariant === "debug"
|
||||||
property stringList generalDefines: [
|
property stringList generalDefines: [
|
||||||
"QT_CREATOR",
|
"QT_CREATOR",
|
||||||
'IDE_LIBRARY_BASENAME="lib"',
|
'IDE_LIBRARY_BASENAME="' + libDirName + '"',
|
||||||
"QT_DISABLE_DEPRECATED_BEFORE=0x040900",
|
"QT_DISABLE_DEPRECATED_BEFORE=0x040900",
|
||||||
"QT_NO_CAST_TO_ASCII",
|
"QT_NO_CAST_TO_ASCII",
|
||||||
"QT_NO_CAST_FROM_ASCII"
|
"QT_NO_CAST_FROM_ASCII"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Application {
|
|||||||
consoleApplication: qbs.debugInformation
|
consoleApplication: qbs.debugInformation
|
||||||
|
|
||||||
cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/.."]
|
cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/.."]
|
||||||
: ["$ORIGIN/../lib/qtcreator"]
|
: ["$ORIGIN/../" + project.libDirName + "/qtcreator"]
|
||||||
cpp.defines: project.generalDefines
|
cpp.defines: project.generalDefines
|
||||||
cpp.linkerFlags: {
|
cpp.linkerFlags: {
|
||||||
if (qbs.buildVariant == "release" && (qbs.toolchain.contains("gcc") || qbs.toolchain.contains("mingw")))
|
if (qbs.buildVariant == "release" && (qbs.toolchain.contains("gcc") || qbs.toolchain.contains("mingw")))
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ QtcTool {
|
|||||||
Depends { name: "CppTools" }
|
Depends { name: "CppTools" }
|
||||||
|
|
||||||
cpp.rpaths: [
|
cpp.rpaths: [
|
||||||
"$ORIGIN/../lib/qtcreator",
|
"$ORIGIN/../" + project.libDirName + "/qtcreator",
|
||||||
"$ORIGIN/../lib/qtcreator/plugins",
|
"$ORIGIN/../" + project.libDirName + "/qtcreator/plugins",
|
||||||
"$ORIGIN/../lib/qtcreator/plugins/QtProject"
|
"$ORIGIN/../" + project.libDirName + "/qtcreator/plugins/QtProject"
|
||||||
]
|
]
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
|
|||||||
@@ -727,7 +727,7 @@ QString QbsProject::pluginsBaseDirectory() const
|
|||||||
if (!qbsInstallDir.isEmpty())
|
if (!qbsInstallDir.isEmpty())
|
||||||
return qbsInstallDir + QLatin1String("/lib/");
|
return qbsInstallDir + QLatin1String("/lib/");
|
||||||
return QDir::cleanPath(QCoreApplication::applicationDirPath()
|
return QDir::cleanPath(QCoreApplication::applicationDirPath()
|
||||||
+ QLatin1String("/../lib/qtcreator"));
|
+ QLatin1String("/../" IDE_LIBRARY_BASENAME "/qtcreator"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
Submodule src/shared/qbs updated: 0816b8e476...3e746e4741
@@ -27,7 +27,7 @@ Project {
|
|||||||
property path libRPaths: qbs.targetOS.contains("osx")
|
property path libRPaths: qbs.targetOS.contains("osx")
|
||||||
? ["@loader_path/.."] : ["$ORIGIN/.."]
|
? ["@loader_path/.."] : ["$ORIGIN/.."]
|
||||||
property path resourcesInstallDir: project.ide_data_path + "/qbs"
|
property path resourcesInstallDir: project.ide_data_path + "/qbs"
|
||||||
property string pluginsInstallDir: "lib/qtcreator"
|
property string pluginsInstallDir: project.libDirName + "/qtcreator"
|
||||||
|
|
||||||
references: [
|
references: [
|
||||||
qbsBaseDir + "/src/lib/libs.qbs",
|
qbsBaseDir + "/src/lib/libs.qbs",
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ CppApplication {
|
|||||||
// absolute paths to resources in the build directory.
|
// absolute paths to resources in the build directory.
|
||||||
// cpp.rpaths: qbs.targetOS.contains("osx")
|
// cpp.rpaths: qbs.targetOS.contains("osx")
|
||||||
// ? ["@executable_path/.."]
|
// ? ["@executable_path/.."]
|
||||||
// : ["$ORIGIN/../lib/qtcreator", "$ORIGIN/../lib/qtcreator/plugins/QtProject"]
|
// : ["$ORIGIN/../" + project.libDirName + "/qtcreator",
|
||||||
|
// "$ORIGIN/../" project.libDirName + "/qtcreator/plugins/QtProject"]
|
||||||
// Group {
|
// Group {
|
||||||
// fileTagsFilter: product.type
|
// fileTagsFilter: product.type
|
||||||
// qbs.install: true
|
// qbs.install: true
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ DynamicLibrary {
|
|||||||
targetName: QtcFunctions.qtLibraryName(qbs, name.split('_')[1])
|
targetName: QtcFunctions.qtLibraryName(qbs, name.split('_')[1])
|
||||||
destinationDirectory: FileInfo.relativePath(project.ide_source_tree, sourceDirectory)
|
destinationDirectory: FileInfo.relativePath(project.ide_source_tree, sourceDirectory)
|
||||||
cpp.rpaths: [
|
cpp.rpaths: [
|
||||||
buildDirectory + "/lib/qtcreator",
|
buildDirectory + "/" + project.libDirName + "/qtcreator",
|
||||||
buildDirectory + "/lib/qtcreator/plugins/QtProject"
|
buildDirectory + "/" + project.libDirName + "/qtcreator/plugins/QtProject"
|
||||||
].concat(additionalRPaths)
|
].concat(additionalRPaths)
|
||||||
property pathList filesToCopy
|
property pathList filesToCopy
|
||||||
property pathList additionalRPaths: []
|
property pathList additionalRPaths: []
|
||||||
|
|||||||
Reference in New Issue
Block a user