summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-06-20 12:13:25 +0200
committerTobias Hunger <tobias.hunger@qt.io>2017-06-20 13:39:12 +0000
commitdac2a188ded0dd2c07cd354fc00331c9603793d8 (patch)
tree0af4ef81575d792edc72c4bd96b6ba1458939a27
parenta027f1cfcede0c404991416f831c57dd5cd9bed3 (diff)
downloadqt-creator-dac2a188ded0dd2c07cd354fc00331c9603793d8.tar.gz
CMake: Make sure no empty strings end up in deployment data
Task-number: QTCREATORBUG-18406 Change-Id: I0b9f8ca76cee8ad2e9ae2ee1f124f16f473033d5 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 101649702c..9ae83d71ad 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -495,8 +495,13 @@ void CMakeProject::updateApplicationAndDeploymentTargets()
if (ct.targetType == UtilityType)
continue;
- if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType)
- deploymentData.addFile(ct.executable.toString(), deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()), DeployableFile::TypeExecutable);
+ if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType) {
+ if (!ct.executable.isEmpty()) {
+ deploymentData.addFile(ct.executable.toString(),
+ deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()),
+ DeployableFile::TypeExecutable);
+ }
+ }
if (ct.targetType == ExecutableType) {
FileName srcWithTrailingSlash = FileName::fromString(ct.sourceDirectory.toString());
srcWithTrailingSlash.appendString('/');