summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-12-03 08:35:28 +0100
committerAndy Shaw <andy.shaw@qt.io>2018-12-20 15:03:10 +0000
commitf377b1ddfb01f654975d8fee1dba3dbed78822e8 (patch)
tree3f001c6706ea1c9369d9b6f9a266655bb4be8daa /qmake/generators/makefile.cpp
parent23207d1d2386d97b9d27f2af385d70f80c14ab95 (diff)
qmake: Add support for installing executable files without calling strip
Since some files are still executable (such as bash scripts) then they should not get strip called on them when installing in those cases. So by adding .CONFIG = nostrip, it indicates that strip should not be called on this. Fixes: QTBUG-60751 Change-Id: I19d502c07644daf9d487a8817c8e57d96eedab60 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 7247d1f8df..765aea4d83 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1289,6 +1289,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
}
}
bool is_target = (wild == fileFixify(var("TARGET"), FileFixifyAbsolute));
+ const bool noStrip = installConfigValues.contains("nostrip");
if(is_target || exists(wild)) { //real file or target
QFileInfo fi(fileInfo(wild));
QString dst_file = filePrefixRoot(root, dst_dir);
@@ -1302,7 +1303,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
cmd = QLatin1String("-$(QINSTALL)");
cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file);
inst << cmd;
- if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
+ if (!noStrip && !project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
!fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
inst << QString("-") + var("QMAKE_STRIP") + " " +
escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + filestr, FileFixifyAbsolute, false)));
@@ -1337,7 +1338,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
QString cmd = QLatin1String("-$(QINSTALL) ") +
escapeFilePath(dirstr + file) + " " + escapeFilePath(dst_file);
inst << cmd;
- if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
+ if (!noStrip && !project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") &&
!fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
inst << QString("-") + var("QMAKE_STRIP") + " " +
escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + file, FileFixifyAbsolute, false)));