forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -115,7 +115,10 @@
|
|||||||
\QC cannot extract files to be installed from a CMake project, and
|
\QC cannot extract files to be installed from a CMake project, and
|
||||||
therefore, only executable targets are automatically added to deployment
|
therefore, only executable targets are automatically added to deployment
|
||||||
files. You must specify all other files in the \c QtCreatorDeployment.txt
|
files. You must specify all other files in the \c QtCreatorDeployment.txt
|
||||||
file that you create and place in the root directory of the CMake project.
|
file that you create and place in either the root directory of the CMake
|
||||||
|
project or the build directory of the active build configuration.
|
||||||
|
Currently, Qt Creator first checks the root directory and only if no
|
||||||
|
\c QtCreatorDeployment.txt exists it checks the active build directory.
|
||||||
|
|
||||||
Use the following syntax in the file:
|
Use the following syntax in the file:
|
||||||
|
|
||||||
|
|||||||
@@ -674,10 +674,14 @@ void CMakeProject::updateApplicationAndDeploymentTargets()
|
|||||||
QFile deploymentFile;
|
QFile deploymentFile;
|
||||||
QTextStream deploymentStream;
|
QTextStream deploymentStream;
|
||||||
QString deploymentPrefix;
|
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")));
|
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)) {
|
if (deploymentFile.open(QFile::ReadOnly | QFile::Text)) {
|
||||||
deploymentStream.setDevice(&deploymentFile);
|
deploymentStream.setDevice(&deploymentFile);
|
||||||
deploymentPrefix = deploymentStream.readLine();
|
deploymentPrefix = deploymentStream.readLine();
|
||||||
@@ -687,7 +691,7 @@ void CMakeProject::updateApplicationAndDeploymentTargets()
|
|||||||
|
|
||||||
BuildTargetInfoList appTargetList;
|
BuildTargetInfoList appTargetList;
|
||||||
DeploymentData deploymentData;
|
DeploymentData deploymentData;
|
||||||
QDir buildDir(t->activeBuildConfiguration()->buildDirectory().toString());
|
|
||||||
foreach (const CMakeBuildTarget &ct, m_buildTargets) {
|
foreach (const CMakeBuildTarget &ct, m_buildTargets) {
|
||||||
if (ct.executable.isEmpty())
|
if (ct.executable.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user