2016-01-15 14:57:40 +01:00
|
|
|
/****************************************************************************
|
2011-11-29 14:19:28 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 Openismus GmbH.
|
|
|
|
|
** Author: Peter Penz (ppenz@openismus.com)
|
|
|
|
|
** Author: Patricia Santana Cruz (patriciasantanacruz@gmail.com)
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2011-11-29 14:19:28 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-11-29 14:19:28 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2011-11-29 14:19:28 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2011-11-29 14:19:28 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-11-29 14:19:28 +01:00
|
|
|
|
2016-02-03 17:21:12 +01:00
|
|
|
#pragma once
|
2011-11-29 14:19:28 +01:00
|
|
|
|
|
|
|
|
#include <projectexplorer/buildconfiguration.h>
|
|
|
|
|
|
2013-07-22 15:53:57 +02:00
|
|
|
namespace Utils { class FileName; }
|
|
|
|
|
|
2011-11-29 14:19:28 +01:00
|
|
|
namespace AutotoolsProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class AutotoolsTarget;
|
|
|
|
|
class AutotoolsBuildConfigurationFactory;
|
|
|
|
|
|
|
|
|
|
class AutotoolsBuildConfiguration : public ProjectExplorer::BuildConfiguration
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
friend class AutotoolsBuildConfigurationFactory;
|
|
|
|
|
|
|
|
|
|
public:
|
2012-04-24 15:49:09 +02:00
|
|
|
explicit AutotoolsBuildConfiguration(ProjectExplorer::Target *parent);
|
|
|
|
|
|
2016-01-29 12:28:31 +01:00
|
|
|
ProjectExplorer::NamedWidget *createConfigWidget() override;
|
2011-11-29 14:19:28 +01:00
|
|
|
|
2016-01-29 12:28:31 +01:00
|
|
|
BuildType buildType() const override;
|
2011-11-29 14:19:28 +01:00
|
|
|
|
|
|
|
|
protected:
|
2014-07-01 11:08:26 +02:00
|
|
|
AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, Core::Id id);
|
2012-04-24 15:49:09 +02:00
|
|
|
AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, AutotoolsBuildConfiguration *source);
|
2011-11-29 14:19:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class AutotoolsBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit AutotoolsBuildConfigurationFactory(QObject *parent = 0);
|
|
|
|
|
|
2016-01-29 12:28:31 +01:00
|
|
|
int priority(const ProjectExplorer::Target *parent) const override;
|
|
|
|
|
QList<ProjectExplorer::BuildInfo *> availableBuilds(const ProjectExplorer::Target *parent) const override;
|
|
|
|
|
int priority(const ProjectExplorer::Kit *k, const QString &projectPath) const override;
|
2013-08-13 10:52:57 +02:00
|
|
|
QList<ProjectExplorer::BuildInfo *> availableSetups(const ProjectExplorer::Kit *k,
|
2016-01-29 12:28:31 +01:00
|
|
|
const QString &projectPath) const override;
|
2013-07-22 15:53:57 +02:00
|
|
|
ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent,
|
2016-01-29 12:28:31 +01:00
|
|
|
const ProjectExplorer::BuildInfo *info) const override;
|
2011-11-29 14:19:28 +01:00
|
|
|
|
2016-01-29 12:28:31 +01:00
|
|
|
bool canClone(const ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const override;
|
|
|
|
|
AutotoolsBuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) override;
|
|
|
|
|
bool canRestore(const ProjectExplorer::Target *parent, const QVariantMap &map) const override;
|
|
|
|
|
AutotoolsBuildConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map) override;
|
2012-04-24 15:49:09 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool canHandle(const ProjectExplorer::Target *t) const;
|
2013-07-22 15:53:57 +02:00
|
|
|
ProjectExplorer::BuildInfo *createBuildInfo(const ProjectExplorer::Kit *k, const Utils::FileName &buildDir) const;
|
2011-11-29 14:19:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace AutotoolsProjectManager
|