diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp index f351fd56aad..f2671539050 100644 --- a/src/plugins/ios/iosrunfactories.cpp +++ b/src/plugins/ios/iosrunfactories.cpp @@ -101,7 +101,7 @@ QList IosRunConfigurationFactory::availableCreationIds(Target *parent, QList nodes = project->allProFiles(QList() << ApplicationTemplate - << LibraryTemplate + << SharedLibraryTemplate << AuxTemplate); if (mode == AutoCreate) nodes = QmakeProject::nodesWithQtcRunnable(nodes); diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp b/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp index dbf112f7a07..8de0fa3ed5d 100644 --- a/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp +++ b/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp @@ -92,7 +92,7 @@ QList QmakeAndroidRunConfigurationFactory::availableCreationIds(Target QmakeProject *project = static_cast(parent->project()); QList nodes = project->allProFiles(QList() << ApplicationTemplate - << LibraryTemplate); + << SharedLibraryTemplate); if (mode == AutoCreate) nodes = QmakeProject::nodesWithQtcRunnable(nodes); diff --git a/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp index fd8761b47e8..9770c70ee4a 100644 --- a/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp +++ b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp @@ -1048,7 +1048,7 @@ void InternalLibraryDetailsController::updateProFile() QList proFiles = findQt4ProFiles(rootProject); foreach (QmakeProFileNode *proFileNode, proFiles) { const QString proFilePath = proFileNode->path().toString(); - if (proFileNode->projectType() == LibraryTemplate) { + if (proFileNode->projectType() == SharedLibraryTemplate) { const QStringList configVar = proFileNode->variableValue(ConfigVar); if (!configVar.contains(QLatin1String("plugin"))) { const QString relProFilePath = rootDir.relativeFilePath(proFilePath); diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 9a10b03850b..6a18db58247 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -917,7 +917,8 @@ QList QmakePriFileNode::supportedActions(Node *node) const switch (proFileNode->projectType()) { case ApplicationTemplate: - case LibraryTemplate: + case StaticLibraryTemplate: + case SharedLibraryTemplate: case AuxTemplate: { // TODO: Some of the file types don't make much sense for aux // projects (e.g. cpp). It'd be nice if the "add" action could @@ -1495,8 +1496,10 @@ static QmakeProjectType proFileTemplateTypeToProjectType(ProFileEvaluator::Templ case ProFileEvaluator::TT_Unknown: case ProFileEvaluator::TT_Application: return ApplicationTemplate; - case ProFileEvaluator::TT_Library: - return LibraryTemplate; + case ProFileEvaluator::TT_StaticLibrary: + return StaticLibraryTemplate; + case ProFileEvaluator::TT_SharedLibrary: + return SharedLibraryTemplate; case ProFileEvaluator::TT_Script: return ScriptTemplate; case ProFileEvaluator::TT_Aux: @@ -1639,7 +1642,7 @@ FolderNode::AddNewInformation QmakeProFileNode::addNewInformation(const QStringL bool QmakeProFileNode::showInSimpleTree(QmakeProjectType projectType) const { - return (projectType == ApplicationTemplate || projectType == LibraryTemplate); + return (projectType == ApplicationTemplate || projectType == SharedLibraryTemplate || projectType == StaticLibraryTemplate); } bool QmakeProFileNode::isDebugAndRelease() const @@ -2512,7 +2515,9 @@ void QmakeProFileNode::updateUiFiles(const QString &buildDir) m_uiFiles.clear(); // Only those two project types can have ui files for us - if (m_projectType == ApplicationTemplate || m_projectType == LibraryTemplate) { + if (m_projectType == ApplicationTemplate || + m_projectType == SharedLibraryTemplate || + m_projectType == StaticLibraryTemplate) { // Find all ui files FindUiFileNodesVisitor uiFilesVisitor; this->accept(&uiFilesVisitor); diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.h b/src/plugins/qmakeprojectmanager/qmakenodes.h index 2a005c4a351..59344ed5611 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.h +++ b/src/plugins/qmakeprojectmanager/qmakenodes.h @@ -72,7 +72,8 @@ class QmakeProject; enum QmakeProjectType { InvalidProject = 0, ApplicationTemplate, - LibraryTemplate, + StaticLibraryTemplate, + SharedLibraryTemplate, ScriptTemplate, AuxTemplate, SubDirsTemplate diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 92d279d671d..aaab37486b7 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -1492,7 +1492,8 @@ void QmakeProject::collectData(const QmakeProFileNode *node, DeploymentData &dep if (!installsList.targetPath.isEmpty()) collectApplicationData(node, deploymentData); break; - case LibraryTemplate: + case SharedLibraryTemplate: + case StaticLibraryTemplate: collectLibraryData(node, deploymentData); break; case SubDirsTemplate: diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index af823daf84a..36bb033afa4 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -175,7 +175,7 @@ ProFileEvaluator::TemplateType ProFileEvaluator::templateType() const if (!t.compare(QLatin1String("app"), Qt::CaseInsensitive)) return TT_Application; if (!t.compare(QLatin1String("lib"), Qt::CaseInsensitive)) - return TT_Library; + return d->isActiveConfig(QStringLiteral("staticlib")) ? TT_StaticLibrary : TT_SharedLibrary; if (!t.compare(QLatin1String("script"), Qt::CaseInsensitive)) return TT_Script; if (!t.compare(QLatin1String("aux"), Qt::CaseInsensitive)) @@ -220,8 +220,8 @@ bool ProFileEvaluator::accept(ProFile *pro, QMakeEvaluator::LoadFlags flags) case TT_Application: cxxflags += d->values(ProKey("QMAKE_CXXFLAGS_APP")); break; - case TT_Library: - if (d->isActiveConfig(QStringLiteral("dll"))) { + case TT_SharedLibrary: + { bool plugin = d->isActiveConfig(QStringLiteral("plugin")); if (!plugin || !d->isActiveConfig(QStringLiteral("plugin_no_share_shlib_cflags"))) cxxflags += d->values(ProKey("QMAKE_CXXFLAGS_SHLIB")); diff --git a/src/shared/proparser/profileevaluator.h b/src/shared/proparser/profileevaluator.h index 5ededbc1764..7249eef1afe 100644 --- a/src/shared/proparser/profileevaluator.h +++ b/src/shared/proparser/profileevaluator.h @@ -58,7 +58,8 @@ public: enum TemplateType { TT_Unknown = 0, TT_Application, - TT_Library, + TT_StaticLibrary, + TT_SharedLibrary, TT_Script, TT_Aux, TT_Subdirs