summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVolker Vogelhuber <wiendl@web.de>2014-11-13 09:26:13 +0100
committerVolker Vogelhuber <wiendl@web.de>2014-12-16 16:19:46 +0100
commit779f38bded1ff53b1e49435b10ce36309b82526e (patch)
treefe9aab2c8f8ea9c266593562ed6a8900d578a3db /src
parentc40d9e9d17ac0bfed0e36372afc02d5136678a0b (diff)
downloadqt-creator-779f38bded1ff53b1e49435b10ce36309b82526e.tar.gz
allow out of tree cmake deployment configurations
Change-Id: I78c7e46372ea7a5c1651c420f66c0ce6326d7297 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp10
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;