2013-04-25 16:02:17 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2013-04-25 16:02:17 +02:00
|
|
|
**
|
|
|
|
|
** 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
|
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.
|
2013-04-25 16:02:17 +02: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.
|
2013-04-25 16:02:17 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
2016-01-15 14:57:40 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2013-04-25 16:02:17 +02:00
|
|
|
#include <QSettings>
|
|
|
|
|
#include <QSharedPointer>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QStringList>
|
|
|
|
|
#include <utils/fileutils.h>
|
|
|
|
|
|
|
|
|
|
namespace Ios {
|
|
|
|
|
|
2017-05-24 23:26:35 -07:00
|
|
|
class XcodePlatform
|
2013-04-25 16:02:17 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2017-05-24 23:26:35 -07:00
|
|
|
class SDK
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString directoryName;
|
2019-05-28 13:49:26 +02:00
|
|
|
Utils::FilePath path;
|
2017-05-24 23:26:35 -07:00
|
|
|
QStringList architectures;
|
2013-04-25 16:02:17 +02:00
|
|
|
};
|
2017-05-24 23:26:35 -07:00
|
|
|
class ToolchainTarget
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString name;
|
|
|
|
|
QString architecture;
|
|
|
|
|
QStringList backendFlags;
|
2013-04-25 16:02:17 +02:00
|
|
|
|
2017-05-24 23:26:35 -07:00
|
|
|
bool operator==(const ToolchainTarget &other) const;
|
2016-11-16 14:59:10 +01:00
|
|
|
};
|
2019-05-28 13:49:26 +02:00
|
|
|
Utils::FilePath developerPath;
|
|
|
|
|
Utils::FilePath cxxCompilerPath;
|
|
|
|
|
Utils::FilePath cCompilerPath;
|
2017-05-24 23:26:35 -07:00
|
|
|
std::vector<ToolchainTarget> targets;
|
|
|
|
|
std::vector<SDK> sdks;
|
2015-10-09 09:50:07 +02:00
|
|
|
|
|
|
|
|
// ignores anything besides name
|
2017-05-24 23:26:35 -07:00
|
|
|
bool operator==(const XcodePlatform &other) const;
|
2013-04-25 16:02:17 +02:00
|
|
|
};
|
|
|
|
|
|
2017-05-24 23:26:35 -07:00
|
|
|
uint qHash(const XcodePlatform &platform);
|
|
|
|
|
uint qHash(const XcodePlatform::ToolchainTarget &target);
|
2015-10-09 09:50:07 +02:00
|
|
|
|
2017-05-24 23:26:35 -07:00
|
|
|
class XcodeProbe
|
2013-04-25 16:02:17 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2019-05-28 13:49:26 +02:00
|
|
|
static Utils::FilePath sdkPath(const QString &devPath, const QString &platformName);
|
2017-05-24 23:26:35 -07:00
|
|
|
static QMap<QString, XcodePlatform> detectPlatforms(const QString &devPath = QString());
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
private:
|
2013-10-02 15:13:17 +02:00
|
|
|
void addDeveloperPath(const QString &path);
|
2013-04-25 16:02:17 +02:00
|
|
|
void detectDeveloperPaths();
|
2017-05-24 23:26:35 -07:00
|
|
|
void setupDefaultToolchains(const QString &devPath);
|
2013-10-07 20:14:54 +02:00
|
|
|
void detectFirst();
|
2017-05-24 23:26:35 -07:00
|
|
|
QMap<QString, XcodePlatform> detectedPlatforms();
|
2013-04-25 16:02:17 +02:00
|
|
|
private:
|
2017-05-24 23:26:35 -07:00
|
|
|
QMap<QString, XcodePlatform> m_platforms;
|
2013-04-25 16:02:17 +02:00
|
|
|
QStringList m_developerPaths;
|
|
|
|
|
};
|
|
|
|
|
} // namespace Ios
|