forked from qt-creator/qt-creator
don't deploy static libraries build using cmake
Change-Id: I00f0fb2474620f86ca4d50a2e47c8ee4bf69239b Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
committed by
Daniel Teske
parent
ec176b4bf4
commit
4a0df73b53
@@ -362,7 +362,7 @@ QStringList CMakeProject::buildTargetTitles(bool runnable) const
|
|||||||
{
|
{
|
||||||
QStringList results;
|
QStringList results;
|
||||||
foreach (const CMakeBuildTarget &ct, m_buildTargets) {
|
foreach (const CMakeBuildTarget &ct, m_buildTargets) {
|
||||||
if (runnable && (ct.executable.isEmpty() || ct.library))
|
if (runnable && (ct.executable.isEmpty() || ct.targetType != ExecutableType))
|
||||||
continue;
|
continue;
|
||||||
results << ct.title;
|
results << ct.title;
|
||||||
}
|
}
|
||||||
@@ -626,7 +626,7 @@ void CMakeProject::updateRunConfigurations(Target *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (const CMakeBuildTarget &ct, buildTargets()) {
|
foreach (const CMakeBuildTarget &ct, buildTargets()) {
|
||||||
if (ct.library)
|
if (ct.targetType != ExecutableType)
|
||||||
continue;
|
continue;
|
||||||
if (ct.executable.isEmpty())
|
if (ct.executable.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
@@ -692,8 +692,9 @@ void CMakeProject::updateApplicationAndDeploymentTargets()
|
|||||||
if (ct.executable.isEmpty())
|
if (ct.executable.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
deploymentData.addFile(ct.executable, deploymentPrefix + buildDir.relativeFilePath(QFileInfo(ct.executable).dir().path()), DeployableFile::TypeExecutable);
|
if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType)
|
||||||
if (!ct.library) {
|
deploymentData.addFile(ct.executable, deploymentPrefix + buildDir.relativeFilePath(QFileInfo(ct.executable).dir().path()), DeployableFile::TypeExecutable);
|
||||||
|
if (ct.targetType == ExecutableType) {
|
||||||
// TODO: Put a path to corresponding .cbp file into projectFilePath?
|
// TODO: Put a path to corresponding .cbp file into projectFilePath?
|
||||||
appTargetList.list << BuildTargetInfo(ct.title,
|
appTargetList.list << BuildTargetInfo(ct.title,
|
||||||
Utils::FileName::fromString(ct.executable),
|
Utils::FileName::fromString(ct.executable),
|
||||||
@@ -1000,7 +1001,7 @@ void CMakeCbpParser::parseBuildTargetOption()
|
|||||||
} else if (attributes().hasAttribute(QLatin1String("type"))) {
|
} else if (attributes().hasAttribute(QLatin1String("type"))) {
|
||||||
const QStringRef value = attributes().value(QLatin1String("type"));
|
const QStringRef value = attributes().value(QLatin1String("type"));
|
||||||
if (value == QLatin1String("2") || value == QLatin1String("3"))
|
if (value == QLatin1String("2") || value == QLatin1String("3"))
|
||||||
m_buildTarget.library = true;
|
m_buildTarget.targetType = TargetType(value.toInt());
|
||||||
} else if (attributes().hasAttribute(QLatin1String("working_dir"))) {
|
} else if (attributes().hasAttribute(QLatin1String("working_dir"))) {
|
||||||
m_buildTarget.workingDirectory = attributes().value(QLatin1String("working_dir")).toString();
|
m_buildTarget.workingDirectory = attributes().value(QLatin1String("working_dir")).toString();
|
||||||
QDir dir(m_buildDirectory);
|
QDir dir(m_buildDirectory);
|
||||||
@@ -1227,7 +1228,7 @@ void CMakeBuildTarget::clear()
|
|||||||
workingDirectory.clear();
|
workingDirectory.clear();
|
||||||
sourceDirectory.clear();
|
sourceDirectory.clear();
|
||||||
title.clear();
|
title.clear();
|
||||||
library = false;
|
targetType = ExecutableType;
|
||||||
includeFiles.clear();
|
includeFiles.clear();
|
||||||
compilerOptions.clear();
|
compilerOptions.clear();
|
||||||
defines.clear();
|
defines.clear();
|
||||||
|
|||||||
@@ -61,11 +61,17 @@ namespace Internal {
|
|||||||
class CMakeFile;
|
class CMakeFile;
|
||||||
class CMakeBuildSettingsWidget;
|
class CMakeBuildSettingsWidget;
|
||||||
|
|
||||||
|
enum TargetType {
|
||||||
|
ExecutableType = 0,
|
||||||
|
StaticLibraryType = 2,
|
||||||
|
DynamicLibraryType = 3
|
||||||
|
};
|
||||||
|
|
||||||
struct CMakeBuildTarget
|
struct CMakeBuildTarget
|
||||||
{
|
{
|
||||||
QString title;
|
QString title;
|
||||||
QString executable; // TODO: rename to output?
|
QString executable; // TODO: rename to output?
|
||||||
bool library;
|
TargetType targetType;
|
||||||
QString workingDirectory;
|
QString workingDirectory;
|
||||||
QString sourceDirectory;
|
QString sourceDirectory;
|
||||||
QString makeCommand;
|
QString makeCommand;
|
||||||
|
|||||||
Reference in New Issue
Block a user