CMakeProjectManager: Fix deployment data setup

In 73b1a765f3, we did not consider that the order of the code mattered,
so we overwrote user-provided deployment information with guessed
locations.

Fixes: QTCREATORBUG-22184
Change-Id: Ied3a7436829e8b857c32e9364508a33414927c99
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-04-23 17:49:42 +02:00
parent c70f59075d
commit fc4e202821

View File

@@ -204,7 +204,8 @@ DeploymentData CMakeBuildConfiguration::deploymentData() const
for (const CMakeBuildTarget &ct : m_buildTargets) {
if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType) {
if (!ct.executable.isEmpty()) {
if (!ct.executable.isEmpty()
&& !result.deployableForLocalFile(ct.executable.toString()).isValid()) {
result.addFile(ct.executable.toString(),
deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()),
DeployableFile::TypeExecutable);