Skip to content

Commit d013df9

Browse files
committed
qt-build-utils: default to qmake, qmake6, qmake-qt5
When using Nix with Qt 6 the output of qmake6 -query is incorrect and ends up pointing to the incorrect locations. But qmake -query points to the correct ones. qt_build_utils also will iterate through the possible qmake executables and match to the major version. Related to #590
1 parent 386a7aa commit d013df9

File tree

1 file changed

+4
-5
lines changed
  • crates/qt-build-utils/src

1 file changed

+4
-5
lines changed

crates/qt-build-utils/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl QtBuild {
254254
}
255255

256256
// Fedora 36 renames Qt5's qmake to qmake-qt5
257-
let candidate_executable_names = ["qmake6", "qmake-qt5", "qmake"];
257+
let candidate_executable_names = ["qmake", "qmake6", "qmake-qt5"];
258258
for (index, executable_name) in candidate_executable_names.iter().enumerate() {
259259
match verify_candidate(executable_name) {
260260
Ok((executable_name, version)) => {
@@ -267,10 +267,9 @@ impl QtBuild {
267267
qt_modules,
268268
});
269269
}
270-
// If QT_VERSION_MAJOR is specified, it is expected that one of the versioned
271-
// executable names will not match, so the unversioned `qmake` needs to be
272-
// attempted last and QtVersionMajorDoesNotMatch should only be returned if
273-
// none of the candidate executable names match.
270+
// If QT_VERSION_MAJOR is specified, it is expected that some of the versioned
271+
// executable names will not match. QtVersionMajorDoesNotMatch should only be
272+
// returned if none of the candidates match.
274273
Err(QtBuildError::QtVersionMajorDoesNotMatch {
275274
qmake_version,
276275
qt_version_major,

0 commit comments

Comments
 (0)