Browse Source

Merge pull request #291 from hkollmann/find_qmake_in_exepath

Find qmake in exepath
master
TheAssassin 7 years ago
committed by GitHub
parent
commit
a41d4d9cbf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      tools/linuxdeployqt/shared.cpp

9
tools/linuxdeployqt/shared.cpp

@ -1070,6 +1070,11 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a
// Use the qmake executable passed in by the user: // Use the qmake executable passed in by the user:
QString qmakePath = qmake; QString qmakePath = qmake;
if (qmakePath.isEmpty()) {
// Try to find qmake in the same path as the executable
QString path = QCoreApplication::applicationDirPath();
qmakePath = QStandardPaths::findExecutable("qmake", QStringList(path));
}
if (qmakePath.isEmpty()) { if (qmakePath.isEmpty()) {
// Try to find a version specific qmake first // Try to find a version specific qmake first
// openSUSE has qmake for Qt 4 and qmake-qt5 for Qt 5 // openSUSE has qmake for Qt 4 and qmake-qt5 for Qt 5
@ -1083,13 +1088,13 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a
LogDebug() << "qmake 4"; LogDebug() << "qmake 4";
} }
if(qmakePath == ""){ if(qmakePath.isEmpty()){
// The upstream name of the binary is "qmake", for Qt 4 and Qt 5 // The upstream name of the binary is "qmake", for Qt 4 and Qt 5
qmakePath = QStandardPaths::findExecutable("qmake"); qmakePath = QStandardPaths::findExecutable("qmake");
} }
} }
if(qmakePath == ""){ if(qmakePath.isEmpty()){
LogError() << "qmake not found on the $PATH"; LogError() << "qmake not found on the $PATH";
exit(1); exit(1);
} }

Loading…
Cancel
Save