diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeproject.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index 75c300f210..c21e1eef7f 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -674,10 +674,14 @@ void CMakeProject::updateApplicationAndDeploymentTargets() QFile deploymentFile; QTextStream deploymentStream; QString deploymentPrefix; - QDir sourceDir; - sourceDir.setPath(t->project()->projectDirectory().toString()); + QDir sourceDir(t->project()->projectDirectory().toString()); + QDir buildDir(t->activeBuildConfiguration()->buildDirectory().toString()); + deploymentFile.setFileName(sourceDir.filePath(QLatin1String("QtCreatorDeployment.txt"))); + // If we don't have a global QtCreatorDeployment.txt check for one created by the active build configuration + if (!deploymentFile.exists()) + deploymentFile.setFileName(buildDir.filePath(QLatin1String("QtCreatorDeployment.txt"))); if (deploymentFile.open(QFile::ReadOnly | QFile::Text)) { deploymentStream.setDevice(&deploymentFile); deploymentPrefix = deploymentStream.readLine(); @@ -687,7 +691,7 @@ void CMakeProject::updateApplicationAndDeploymentTargets() BuildTargetInfoList appTargetList; DeploymentData deploymentData; - QDir buildDir(t->activeBuildConfiguration()->buildDirectory().toString()); + foreach (const CMakeBuildTarget &ct, m_buildTargets) { if (ct.executable.isEmpty()) continue; |