aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qbs.qbs9
-rw-r--r--src/app/qbs/commandlinefrontend.cpp3
-rw-r--r--src/app/qbs/qbs.pro3
-rw-r--r--src/app/qbs/qbs.qbs5
-rw-r--r--src/lib/Library.qbs2
-rw-r--r--src/lib/corelib/use_corelib.pri7
-rw-r--r--src/lib/library.pri8
-rw-r--r--src/lib/qtprofilesetup/use_qtprofilesetup.pri7
-rw-r--r--src/library_dirname.pri1
-rw-r--r--src/plugins/plugins.pri4
-rw-r--r--src/plugins/scanner/scannerplugin.qbs2
11 files changed, 33 insertions, 18 deletions
diff --git a/qbs.qbs b/qbs.qbs
index e0fe2691a..a16dd305a 100644
--- a/qbs.qbs
+++ b/qbs.qbs
@@ -5,17 +5,18 @@ Project {
property bool enableRPath: true
property bool installApiHeaders: true
property bool withExamples: true
- property string libInstallDir: qbs.targetOS.contains("windows") ? "bin" : "lib"
+ property string libDirName: "lib"
+ property string libInstallDir: qbs.targetOS.contains("windows") ? "bin" : libDirName
property string libRPaths: {
if (!project.enableRPath)
return undefined;
if (qbs.targetOS.contains("linux"))
- return ["$ORIGIN/../lib"];
+ return ["$ORIGIN/../" + libDirName];
if (qbs.targetOS.contains("osx"))
- return ["@loader_path/../lib"]
+ return ["@loader_path/../" + libDirName]
}
property string resourcesInstallDir: ""
- property string pluginsInstallDir: "lib"
+ property string pluginsInstallDir: libDirName
references: [
"doc/doc.qbs",
diff --git a/src/app/qbs/commandlinefrontend.cpp b/src/app/qbs/commandlinefrontend.cpp
index 09e14831f..62c3dd5fd 100644
--- a/src/app/qbs/commandlinefrontend.cpp
+++ b/src/app/qbs/commandlinefrontend.cpp
@@ -143,7 +143,8 @@ void CommandLineFrontend::start()
profileName = m_settings->defaultProfile();
const Preferences prefs(m_settings, profileName);
params.setSearchPaths(prefs.searchPaths(qbsRootPath));
- params.setPluginPaths(prefs.pluginPaths(qbsRootPath + QLatin1String("/lib")));
+ params.setPluginPaths(prefs.pluginPaths(qbsRootPath
+ + QLatin1String("/" QBS_LIBRARY_DIRNAME)));
params.setBuildRoot(buildDirectory(profileName));
params.setBuildConfiguration(baseConfig);
params.setOverriddenValues(userConfig);
diff --git a/src/app/qbs/qbs.pro b/src/app/qbs/qbs.pro
index 9e4553c53..cc48c5c78 100644
--- a/src/app/qbs/qbs.pro
+++ b/src/app/qbs/qbs.pro
@@ -19,3 +19,6 @@ HEADERS += \
commandlinefrontend.h \
qbstool.h \
../shared/qbssettings.h
+
+include(../../library_dirname.pri)
+DEFINES += QBS_LIBRARY_DIRNAME=\\\"$${QBS_LIBRARY_DIRNAME}\\\"
diff --git a/src/app/qbs/qbs.qbs b/src/app/qbs/qbs.qbs
index db3b9fad9..71a89c43b 100644
--- a/src/app/qbs/qbs.qbs
+++ b/src/app/qbs/qbs.qbs
@@ -5,7 +5,10 @@ import "../../../version.js" as Version
QbsApp {
name: "qbs_app"
targetName: "qbs"
- cpp.defines: ["QBS_VERSION=\"" + Version.qbsVersion() + "\""]
+ cpp.defines: base.concat([
+ 'QBS_VERSION="' + Version.qbsVersion() + '"',
+ 'QBS_LIBRARY_DIRNAME="' + project.libDirName + '"'
+ ])
files: [
"../shared/qbssettings.h",
"application.cpp",
diff --git a/src/lib/Library.qbs b/src/lib/Library.qbs
index 8fea75550..213091638 100644
--- a/src/lib/Library.qbs
+++ b/src/lib/Library.qbs
@@ -7,7 +7,7 @@ Product {
version: Version.qbsVersion()
type: Qt.core.staticBuild ? "staticlibrary" : "dynamiclibrary"
targetName: (qbs.enableDebugCode && qbs.targetOS.contains("windows")) ? (name + 'd') : name
- destinationDirectory: qbs.targetOS.contains("windows") ? "bin" : "lib"
+ destinationDirectory: qbs.targetOS.contains("windows") ? "bin" : project.libDirName
cpp.defines: base.concat(type == "staticlibrary" ? ["QBS_STATIC_LIB"] : ["QBS_LIBRARY"])
cpp.installNamePrefix: "@rpath/"
property string headerInstallPrefix: "/include/qbs"
diff --git a/src/lib/corelib/use_corelib.pri b/src/lib/corelib/use_corelib.pri
index 875c51f51..ac3f309fb 100644
--- a/src/lib/corelib/use_corelib.pri
+++ b/src/lib/corelib/use_corelib.pri
@@ -1,7 +1,8 @@
include(../../../qbs_version.pri)
+include(../../library_dirname.pri)
isEmpty(QBSLIBDIR) {
- QBSLIBDIR = $$OUT_PWD/../../../lib
+ QBSLIBDIR = $$OUT_PWD/../../../$${QBS_LIBRARY_DIRNAME}
}
QT += script xml
@@ -11,8 +12,8 @@ unix {
}
!disable_rpath {
- linux-*:QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,\$\$ORIGIN/../lib\'
- macx:QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../lib
+ linux-*:QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,\$\$ORIGIN/../$${QBS_LIBRARY_DIRNAME}\'
+ macx:QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../$${QBS_LIBRARY_DIRNAME}
}
!CONFIG(static, static|shared) {
diff --git a/src/lib/library.pri b/src/lib/library.pri
index fbb159ca6..643c90649 100644
--- a/src/lib/library.pri
+++ b/src/lib/library.pri
@@ -1,9 +1,11 @@
+include(../library_dirname.pri)
+
TEMPLATE = lib
QT = core
!isEmpty(QBS_DLLDESTDIR):DLLDESTDIR = $${QBS_DLLDESTDIR}
else:DLLDESTDIR = ../../../bin
!isEmpty(QBS_DESTDIR):DESTDIR = $${QBS_DESTDIR}
-else:DESTDIR = ../../../lib
+else:DESTDIR = ../../../$${QBS_LIBRARY_DIRNAME}
CONFIG(static, static|shared) {
DEFINES += QBS_STATIC_LIB
} else {
@@ -22,11 +24,11 @@ win32 {
dlltarget.path = $${QBS_INSTALL_PREFIX}/bin
INSTALLS += dlltarget
}
+
!win32|!qbs_no_dev_install {
!isEmpty(QBS_LIB_INSTALL_DIR): \
target.path = $${QBS_LIB_INSTALL_DIR}
else: \
- target.path = $${QBS_INSTALL_PREFIX}/lib
+ target.path = $${QBS_INSTALL_PREFIX}/$${QBS_LIBRARY_DIRNAME}
INSTALLS += target
}
-
diff --git a/src/lib/qtprofilesetup/use_qtprofilesetup.pri b/src/lib/qtprofilesetup/use_qtprofilesetup.pri
index 9ed5ad033..1cba270e8 100644
--- a/src/lib/qtprofilesetup/use_qtprofilesetup.pri
+++ b/src/lib/qtprofilesetup/use_qtprofilesetup.pri
@@ -1,7 +1,8 @@
include(../../../qbs_version.pri)
+include(../../library_dirname.pri)
isEmpty(QBSLIBDIR) {
- QBSLIBDIR = $${OUT_PWD}/../../../lib
+ QBSLIBDIR = $${OUT_PWD}/../../../$${QBS_LIBRARY_DIRNAME}
}
LIBNAME=qbsqtprofilesetup
@@ -11,8 +12,8 @@ unix {
}
!disable_rpath {
- linux-*:QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,\$\$ORIGIN/../lib\'
- macx:QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../lib
+ linux-*:QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,\$\$ORIGIN/../$${QBS_LIBRARY_DIRNAME}\'
+ macx:QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../$${QBS_LIBRARY_DIRNAME}
}
!CONFIG(static, static|shared) {
diff --git a/src/library_dirname.pri b/src/library_dirname.pri
new file mode 100644
index 000000000..1e76f1cac
--- /dev/null
+++ b/src/library_dirname.pri
@@ -0,0 +1 @@
+isEmpty(QBS_QBS_LIBRARY_DIRNAME):QBS_LIBRARY_DIRNAME = lib
diff --git a/src/plugins/plugins.pri b/src/plugins/plugins.pri
index 46b33d431..a348d52fd 100644
--- a/src/plugins/plugins.pri
+++ b/src/plugins/plugins.pri
@@ -13,9 +13,11 @@ CONFIG += depend_includepath
CONFIG += shared
unix: CONFIG += plugin
+include(../library_dirname.pri)
+
!isEmpty(QBS_PLUGINS_INSTALL_DIR): \
installPrefix = $${QBS_PLUGINS_INSTALL_DIR}
else: \
- installPrefix = $${QBS_INSTALL_PREFIX}/lib
+ installPrefix = $${QBS_INSTALL_PREFIX}/$${QBS_LIBRARY_DIRNAME}
target.path = $${installPrefix}/qbs/plugins
INSTALLS += target
diff --git a/src/plugins/scanner/scannerplugin.qbs b/src/plugins/scanner/scannerplugin.qbs
index 975c510cc..9428741e8 100644
--- a/src/plugins/scanner/scannerplugin.qbs
+++ b/src/plugins/scanner/scannerplugin.qbs
@@ -3,7 +3,7 @@ import qbs 1.0
DynamicLibrary {
Depends { name: "cpp" }
Depends { name: "Qt.core" }
- destinationDirectory: "lib/qbs/plugins"
+ destinationDirectory: project.libDirName + "/qbs/plugins"
Group {
fileTagsFilter: ["dynamiclibrary"]
qbs.install: true