diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index 101649702cf..9ae83d71ad6 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('/');