Skip to content
Snippets Groups Projects
Commit cf9d340a authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Qbs: Update profile information set by creator


Change-Id: I15948c90a06e60969a4d1d95e80a7394d1a7bb9a
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 2b64cdcd
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,8 @@ const char PROFILES_PREFIX[] = "profiles."; ...@@ -54,6 +54,8 @@ const char PROFILES_PREFIX[] = "profiles.";
// Qt related settings: // Qt related settings:
const char QTCORE_BINPATH[] = ".Qt.core.binPath"; const char QTCORE_BINPATH[] = ".Qt.core.binPath";
const char QTCORE_BUILDVARIANT[] = ".Qt.core.buildVariant";
const char QTCORE_DOCPATH[] = ".Qt.core.docPath";
const char QTCORE_INCPATH[] = ".Qt.core.incPath"; const char QTCORE_INCPATH[] = ".Qt.core.incPath";
const char QTCORE_LIBPATH[] = ".Qt.core.libPath"; const char QTCORE_LIBPATH[] = ".Qt.core.libPath";
const char QTCORE_VERSION[] = ".Qt.core.version"; const char QTCORE_VERSION[] = ".Qt.core.version";
...@@ -67,6 +69,7 @@ const char QTCORE_FRAMEWORKBUILD[] = ".Qt.core.frameworkBuild"; ...@@ -67,6 +69,7 @@ const char QTCORE_FRAMEWORKBUILD[] = ".Qt.core.frameworkBuild";
const char QBS_TARGETOS[] = ".qbs.targetOS"; const char QBS_TARGETOS[] = ".qbs.targetOS";
const char QBS_SYSROOT[] = ".qbs.sysroot"; const char QBS_SYSROOT[] = ".qbs.sysroot";
const char QBS_ARCHITECTURE[] = ".qbs.architecture"; const char QBS_ARCHITECTURE[] = ".qbs.architecture";
const char QBS_ENDIANNESS[] = ".qbs.endianness";
const char QBS_TOOLCHAIN[] = ".qbs.toolchain"; const char QBS_TOOLCHAIN[] = ".qbs.toolchain";
const char CPP_TOOLCHAINPATH[] = ".cpp.toolchainInstallPath"; const char CPP_TOOLCHAINPATH[] = ".cpp.toolchainInstallPath";
const char CPP_COMPILERNAME[] = ".cpp.compilerName"; const char CPP_COMPILERNAME[] = ".cpp.compilerName";
...@@ -210,6 +213,13 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k) ...@@ -210,6 +213,13 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k)
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(k); QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(k);
if (qt) { if (qt) {
data.insert(QLatin1String(QTCORE_BINPATH), qt->binPath().toUserOutput()); data.insert(QLatin1String(QTCORE_BINPATH), qt->binPath().toUserOutput());
QStringList builds;
if (qt->hasDebugBuild())
builds << QLatin1String("debug");
if (qt->hasReleaseBuild())
builds << QLatin1String("release");
data.insert(QLatin1String(QTCORE_BUILDVARIANT), builds);
data.insert(QLatin1String(QTCORE_DOCPATH), qt->docsPath().toUserOutput());
data.insert(QLatin1String(QTCORE_INCPATH), qt->headerPath().toUserOutput()); data.insert(QLatin1String(QTCORE_INCPATH), qt->headerPath().toUserOutput());
data.insert(QLatin1String(QTCORE_LIBPATH), qt->libraryPath().toUserOutput()); data.insert(QLatin1String(QTCORE_LIBPATH), qt->libraryPath().toUserOutput());
Utils::FileName mkspecPath = qt->mkspecsPath(); Utils::FileName mkspecPath = qt->mkspecsPath();
...@@ -234,6 +244,11 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k) ...@@ -234,6 +244,11 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k)
architecture.append(QLatin1String("_64")); architecture.append(QLatin1String("_64"));
data.insert(QLatin1String(QBS_ARCHITECTURE), architecture); data.insert(QLatin1String(QBS_ARCHITECTURE), architecture);
if (targetAbi.endianness() == ProjectExplorer::Abi::BigEndian)
data.insert(QLatin1String(QBS_ENDIANNESS), QLatin1String("big"));
else
data.insert(QLatin1String(QBS_ENDIANNESS), QLatin1String("little"));
if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) { if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) {
data.insert(QLatin1String(QBS_TARGETOS), QLatin1String("windows")); data.insert(QLatin1String(QBS_TARGETOS), QLatin1String("windows"));
data.insert(QLatin1String(QBS_TOOLCHAIN), data.insert(QLatin1String(QBS_TOOLCHAIN),
...@@ -244,7 +259,14 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k) ...@@ -244,7 +259,14 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k)
data.insert(QLatin1String(QBS_TOOLCHAIN), QLatin1String("gcc")); data.insert(QLatin1String(QBS_TOOLCHAIN), QLatin1String("gcc"));
} else if (targetAbi.os() == ProjectExplorer::Abi::LinuxOS) { } else if (targetAbi.os() == ProjectExplorer::Abi::LinuxOS) {
data.insert(QLatin1String(QBS_TARGETOS), QLatin1String("linux")); data.insert(QLatin1String(QBS_TARGETOS), QLatin1String("linux"));
data.insert(QLatin1String(QBS_TOOLCHAIN), QLatin1String("gcc")); if (tc->type() != QLatin1String("clang")) {
data.insert(QLatin1String(QBS_TOOLCHAIN), QLatin1String("gcc"));
} else {
data.insert(QLatin1String(QBS_TOOLCHAIN),
QStringList() << QLatin1String("clang")
<< QLatin1String("llvm")
<< QLatin1String("gcc"));
}
} }
Utils::FileName cxx = tc->compilerCommand(); Utils::FileName cxx = tc->compilerCommand();
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxx.toFileInfo().absolutePath()); data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxx.toFileInfo().absolutePath());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment