forked from qt-creator/qt-creator
CMake: More FilePath in Deployment data
Change-Id: I898a621a34558a28d4688a33aeb9bb9148df6901 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -1093,28 +1093,28 @@ DeploymentData CMakeBuildSystem::deploymentData() const
|
||||
{
|
||||
DeploymentData result;
|
||||
|
||||
QDir sourceDir = project()->projectDirectory().toString();
|
||||
QDir buildDir = buildConfiguration()->buildDirectory().toString();
|
||||
FilePath sourceDir = project()->projectDirectory();
|
||||
FilePath buildDir = buildConfiguration()->buildDirectory();
|
||||
|
||||
QString deploymentPrefix;
|
||||
QString deploymentFilePath = sourceDir.filePath("QtCreatorDeployment.txt");
|
||||
FilePath deploymentFilePath = sourceDir.pathAppended("QtCreatorDeployment.txt");
|
||||
|
||||
bool hasDeploymentFile = QFileInfo::exists(deploymentFilePath);
|
||||
bool hasDeploymentFile = deploymentFilePath.exists();
|
||||
if (!hasDeploymentFile) {
|
||||
deploymentFilePath = buildDir.filePath("QtCreatorDeployment.txt");
|
||||
hasDeploymentFile = QFileInfo::exists(deploymentFilePath);
|
||||
deploymentFilePath = buildDir.pathAppended("QtCreatorDeployment.txt");
|
||||
hasDeploymentFile = deploymentFilePath.exists();
|
||||
}
|
||||
if (!hasDeploymentFile)
|
||||
return result;
|
||||
|
||||
deploymentPrefix = result.addFilesFromDeploymentFile(deploymentFilePath,
|
||||
sourceDir.absolutePath());
|
||||
deploymentPrefix = result.addFilesFromDeploymentFile(deploymentFilePath.toString(),
|
||||
sourceDir.toString());
|
||||
for (const CMakeBuildTarget &ct : m_buildTargets) {
|
||||
if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType) {
|
||||
if (!ct.executable.isEmpty()
|
||||
&& result.deployableForLocalFile(ct.executable).localFilePath() != ct.executable) {
|
||||
result.addFile(ct.executable,
|
||||
deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()),
|
||||
deploymentPrefix + buildDir.relativeChildPath(ct.executable).toString(),
|
||||
DeployableFile::TypeExecutable);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user