From 089cf07820abd2c94b315aa904db716204037121 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 10 Sep 2018 12:48:30 +0200 Subject: [PATCH] QMake: Make sure executable targets have executable suffixes Task-number: QTCREATORBUG-9022 Change-Id: Id885a81228090a18128b8d145b50d89294db31c2 Reviewed-by: hjk --- src/plugins/qmakeprojectmanager/qmakeproject.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index d635c8791eb..2b1529f6339 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -1347,8 +1347,11 @@ QString QmakeProject::executableFor(const QmakeProFile *file) && 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; + const QString extension = file->singleVariableValue(Variable::TargetExt); + if (extension.isEmpty()) + target = HostOsInfo::withExecutableSuffix(ti.target); + else + target = ti.target + extension; } return QDir(destDirFor(ti).toString()).absoluteFilePath(target); }