Commit a57f9300 authored by Christian Kandeler's avatar Christian Kandeler

qbs build: Adapt to new implementation of qbs.FileInfo.

We cannot pass in a relative path as the first argument of
FileInfo.relativePath() anymore, which we relied on in some places. The
old implementation assumed that if both arguments were relative paths,
they had an implicit common base directory.

Change-Id: I55ee62e478da761cf085587c57220d5fb1ac990e
Reviewed-by: default avatarJake Petroules <jake.petroules@theqtcompany.com>
parent eaabc261
......@@ -7,10 +7,10 @@ QtcProduct {
installDir: project.ide_libexec_path
cpp.rpaths: {
var relativePathToLibs
= FileInfo.relativePath(project.ide_libexec_path, project.ide_library_path);
var relativePathToPlugins
= FileInfo.relativePath(project.ide_libexec_path, project.ide_plugin_path);
var relativePathToLibs = FileInfo.relativePath('/' + project.ide_libexec_path,
'/' + project.ide_library_path);
var relativePathToPlugins = FileInfo.relativePath('/' + project.ide_libexec_path,
'/' + project.ide_plugin_path);
var prefix = qbs.targetOS.contains("osx") ? "@executable_path" : "$ORIGIN";
return [
FileInfo.joinPaths(prefix, relativePathToLibs),
......
......@@ -6,8 +6,8 @@ QtcLibrary {
cpp.defines: base.concat([
"QTCREATOR_UTILS_LIB",
"QTC_REL_TOOLS_PATH=\"" + FileInfo.relativePath(project.ide_bin_path,
project.ide_libexec_path) + "\""
"QTC_REL_TOOLS_PATH=\"" + FileInfo.relativePath('/' + project.ide_bin_path,
'/' + project.ide_libexec_path) + "\""
])
cpp.dynamicLibraries: {
var libs = [];
......
......@@ -29,16 +29,18 @@ Project {
property bool installApiHeaders: false
property string libInstallDir: project.ide_library_path
property stringList libRPaths: qbs.targetOS.contains("osx")
? ["@loader_path/" + FileInfo.relativePath(appInstallDir, libInstallDir)]
? ["@loader_path/" + FileInfo.relativePath('/' + appInstallDir, '/' + libInstallDir)]
: ["$ORIGIN/..", "$ORIGIN/../" + project.ide_library_path]
property string resourcesInstallDir: project.ide_data_path + "/qbs"
property string pluginsInstallDir: project.ide_plugin_path
property string appInstallDir: project.ide_bin_path
property string libexecInstallDir: project.ide_libexec_path
property string relativeLibexecPath: FileInfo.relativePath(appInstallDir, libexecInstallDir)
property string relativePluginsPath: FileInfo.relativePath(appInstallDir, pluginsInstallDir)
property string relativeSearchPath: FileInfo.relativePath(appInstallDir,
resourcesInstallDir)
property string relativeLibexecPath: FileInfo.relativePath('/' + appInstallDir,
'/' + libexecInstallDir)
property string relativePluginsPath: FileInfo.relativePath('/' + appInstallDir,
'/' + pluginsInstallDir)
property string relativeSearchPath: FileInfo.relativePath('/' + appInstallDir,
'/' + resourcesInstallDir)
references: [
qbsBaseDir + "/src/lib/libs.qbs",
......
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