Files
qt-creator/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h
BogDan Vatra 26463a2219 Say hello to Android CMake support
Requirements:
 - NDKr19 or newer
 - Qt 5.12.1 or newer

QtCreator supports the following variables:
 - ANDROID_PACKAGE_SOURCE_DIR
 - ANDROID_EXTRA_LIBS

Be aware, that there is a lot of magic done on QtCreator side, and you
can't use only cmake to build an Android APK.

[ChangeLog][Android][CMake] Add Android support for CMake projects.

Change-Id: I1d351976ed56f424c2bc972f4ff7b5968147a2ed
Reviewed-by: hjk <hjk@qt.io>
2019-03-06 14:47:27 +00:00

87 lines
2.9 KiB
C++

/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** 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
** 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.
**
** 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.
**
****************************************************************************/
#pragma once
#include "cmakeconfigitem.h"
#include <projectexplorer/projectnodes.h>
namespace CMakeProjectManager {
namespace Internal {
class CMakeInputsNode : public ProjectExplorer::ProjectNode
{
public:
CMakeInputsNode(const Utils::FileName &cmakeLists);
};
class CMakeListsNode : public ProjectExplorer::ProjectNode
{
public:
CMakeListsNode(const Utils::FileName &cmakeListPath);
bool showInSimpleTree() const final;
bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override;
Utils::optional<Utils::FileName> visibleAfterAddFileAction() const override;
};
class CMakeProjectNode : public ProjectExplorer::ProjectNode
{
public:
CMakeProjectNode(const Utils::FileName &directory);
QString tooltip() const final;
bool addFiles(const QStringList &filePaths, QStringList *notAdded) override;
};
class CMakeTargetNode : public ProjectExplorer::ProjectNode
{
public:
CMakeTargetNode(const Utils::FileName &directory, const QString &target);
static QString generateId(const Utils::FileName &directory, const QString &target);
void setTargetInformation(const QList<Utils::FileName> &artifacts, const QString &type);
QString tooltip() const final;
QString buildKey() const final;
bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override;
bool addFiles(const QStringList &filePaths, QStringList *notAdded) override;
Utils::optional<Utils::FileName> visibleAfterAddFileAction() const override;
QVariant data(Core::Id role) const override;
void setConfig(const CMakeConfig &config);
private:
QString m_tooltip;
CMakeConfig m_config;
};
} // namespace Internal
} // namespace CMakeProjectManager