Skip to content

Commit

Permalink
Qt 6 / Qbs: Avoid some warnings about non-existing files
Browse files Browse the repository at this point in the history
Put the major version of Qt in the file name dynamically.

Also, it appears since Qt 6, the .so files no longer have a ".so.6.0" version,
only ".so", ".so.6" and ".so.6.0.0" are present in the distributed Qt binaries.
  • Loading branch information
bjorn committed Oct 13, 2020
1 parent e5f65a5 commit 2e4257a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions dist/distribute.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,26 @@ Product {
var major = lib + "." + Qt.core.versionMajor;
var minor = major + "." + Qt.core.versionMinor;
var patch = minor + "." + Qt.core.versionPatch;
if (File.exists(minor))
result.push(minor)
if (File.exists(lib))
result.push(lib)
result.push(major, minor, patch);
result.push(major, patch);
}
return result;
}

var list = [];

if (!Qt.core.frameworkBuild) {
var major = Qt.core.versionMajor;
list.push(
"Qt5Core" + postfix,
"Qt5Gui" + postfix,
"Qt5Network" + postfix,
"Qt5Qml" + postfix,
"Qt5Svg" + postfix,
"Qt5Widgets" + postfix
"Qt" + major + "Core" + postfix,
"Qt" + major + "Gui" + postfix,
"Qt" + major + "Network" + postfix,
"Qt" + major + "Qml" + postfix,
"Qt" + major + "Svg" + postfix,
"Qt" + major + "Widgets" + postfix
);
}

Expand All @@ -89,8 +92,8 @@ Product {
} else if (qbs.targetOS.contains("linux")) {
list = addQtVersions(list);
list = list.concat(addQtVersions([
"Qt5DBus.so",
"Qt5XcbQpa.so",
"Qt" + major + "DBus.so",
"Qt" + major + "XcbQpa.so",
]))

if (File.exists(prefix + "icudata.so.56")) {
Expand Down

0 comments on commit 2e4257a

Please sign in to comment.