forked from qt-creator/qt-creator
QmakePM: Fix executableFor() on macOS
Ensure that target is not empty and avoid storing a path instead of the real executable. Change-Id: I408a54befbbb7004773d04f4bdd3898469efbaa7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1312,9 +1312,9 @@ QString QmakeProject::executableFor(const QmakeProFile *file)
|
||||
TargetInformation ti = file->targetInformation();
|
||||
QString target;
|
||||
|
||||
if (tc->targetAbi().os() == Abi::DarwinOS) {
|
||||
if (file->variableValue(Variable::Config).contains(QLatin1String("app_bundle")))
|
||||
target = ti.target + QLatin1String(".app/Contents/MacOS/") + ti.target;
|
||||
if (tc->targetAbi().os() == Abi::DarwinOS
|
||||
&& file->variableValue(Variable::Config).contains("app_bundle")) {
|
||||
target = ti.target + ".app/Contents/MacOS/" + ti.target;
|
||||
} else {
|
||||
QString extension = file->singleVariableValue(Variable::TargetExt);
|
||||
target = ti.target + extension;
|
||||
|
Reference in New Issue
Block a user