Commit 0cb8c463 authored by Yuchen Deng's avatar Yuchen Deng Committed by Daniel Teske
Browse files

Fix cross compiling for CMake based project



On Linux/Unix, there does not exist "MinGW Makefiles" generator.
Using "Unix Makefiles" can simply fixed the issue on Linux.
And does not effect Windows builds.

Change-Id: Id69e1a24485fbab05866f52d823035abc1dca06b
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 89cfba79
......@@ -423,8 +423,14 @@ void CMakeRunPage::initializePage()
if (hasCodeBlocksGenerator && (cachedGenerator.isEmpty() || cachedGenerator == "NMake Makefiles"))
m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(p->displayName()), profileVariant);
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
#ifdef Q_OS_WIN
if (cachedGenerator.isEmpty() || cachedGenerator == "MinGW Makefiles")
m_generatorComboBox->addItem(tr("MinGW Generator (%1)").arg(p->displayName()), profileVariant);
#else
if (cachedGenerator.isEmpty() || cachedGenerator == "Unix Makefiles")
m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(p->displayName()), profileVariant);
#endif
}
} else {
// Non windows
......@@ -460,7 +466,11 @@ void CMakeRunPage::runCMake()
QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles");
if (tc->targetAbi().os() == ProjectExplorer::Abi::WindowsOS) {
if (tc->targetAbi().osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor)
#ifdef Q_OS_WIN
generator = QLatin1String("-GCodeBlocks - MinGW Makefiles");
#else
generator = QLatin1String("-GCodeBlocks - Unix Makefiles");
#endif
else
generator = QLatin1String("-GCodeBlocks - NMake Makefiles");
}
......
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