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>
This commit is contained in:
Tobias Hunger
2017-06-20 12:13:25 +02:00
parent a027f1cfce
commit dac2a188de

View File

@@ -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('/');