Commit 32c45cfc authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Toolchain: Add "sysroot" feature.

Reviewed-by: Tobias Hunger
parent a77c94a6
......@@ -84,6 +84,7 @@ public:
virtual ToolChainType type() const = 0;
virtual QString makeCommand() const = 0;
virtual IOutputParser *outputParser() const = 0;
virtual QString sysroot() const { return QString(); }
ToolChain();
virtual ~ToolChain();
......
......@@ -597,10 +597,10 @@ void MaemoDeployStep::installToSysroot()
} else {
writeOutput(tr("Copying files to sysroot ..."));
Q_ASSERT(!m_filesToCopy.isEmpty());
QDir sysRootDir(toolChain()->sysrootRoot());
QDir sysRootDir(toolChain()->sysroot());
foreach (const MaemoDeployable &d, m_filesToCopy) {
const QLatin1Char sep('/');
const QString targetFilePath = toolChain()->sysrootRoot() + sep
const QString targetFilePath = toolChain()->sysroot() + sep
+ d.remoteDir + sep + QFileInfo(d.localFilePath).fileName();
sysRootDir.mkpath(d.remoteDir.mid(1));
QFile::remove(targetFilePath);
......
......@@ -242,7 +242,7 @@ MaemoDeployStep *MaemoRunConfiguration::deployStep() const
const QString MaemoRunConfiguration::sysRoot() const
{
if (const MaemoToolChain *tc = toolchain())
return tc->sysrootRoot();
return tc->sysroot();
return QString();
}
......
......@@ -70,7 +70,7 @@ void MaemoToolChain::addToEnvironment(Utils::Environment &env)
.arg(MaemoGlobal::targetRoot(m_qtVersion))));
// put this into environment to make pkg-config stuff work
env.prependOrSet(QLatin1String("SYSROOT_DIR"), sysrootRoot());
env.prependOrSet(QLatin1String("SYSROOT_DIR"), sysroot());
env.prependOrSetPath(QDir::toNativeSeparators(QString("%1/madbin")
.arg(maddeRoot)));
env.prependOrSetPath(QDir::toNativeSeparators(QString("%1/madlib")
......@@ -90,7 +90,7 @@ bool MaemoToolChain::equals(const ToolChain *other) const
return other->type() == type() && toolChain->m_qtVersion == m_qtVersion;
}
QString MaemoToolChain::sysrootRoot() const
QString MaemoToolChain::sysroot() const
{
if (!m_sysrootInitialized)
setSysroot();
......
......@@ -49,8 +49,7 @@ public:
void addToEnvironment(Utils::Environment &env);
ProjectExplorer::ToolChainType type() const;
QString makeCommand() const;
QString sysrootRoot() const;
QString sysroot() const;
protected:
bool equals(const ToolChain *other) const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment