QStringList QmakeBuildConfiguration::deduceArgumnetsForTargetAbi(const ProjectExplorer::Abi &targetAbi, const BaseQtVersion *version) { QStringList arguments; if ((targetAbi.os() == ProjectExplorer::Abi::MacOS) && (targetAbi.binaryFormat() == ProjectExplorer::Abi::MachOFormat)) { if (targetAbi.architecture() == ProjectExplorer::Abi::X86Architecture) { if (targetAbi.wordWidth() == 32) arguments << QLatin1String("CONFIG+=x86"); else if (targetAbi.wordWidth() == 64) arguments << QLatin1String("CONFIG+=x86_64"); const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios"; if (version && version->type() == QLatin1String(IOSQT)) // ugly, we can't distinguish between ios and mac toolchains arguments << QLatin1String("CONFIG+=iphonesimulator"); } else if (targetAbi.architecture() == ProjectExplorer::Abi::PowerPCArchitecture) { if (targetAbi.wordWidth() == 32) arguments << QLatin1String("CONFIG+=ppc"); else if (targetAbi.wordWidth() == 64) arguments << QLatin1String("CONFIG+=ppc64"); } else if (targetAbi.architecture() == ProjectExplorer::Abi::ArmArchitecture) { arguments << QLatin1String("CONFIG+=iphoneos"); } } return arguments; }
/// /// moreArguments, /// -unix for Maemo /// QMAKE_VAR_QMLJSDEBUGGER_PATH QStringList QMakeStep::deducedArguments() { QStringList arguments; ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile()); ProjectExplorer::Abi targetAbi; if (tc) targetAbi = tc->targetAbi(); #if defined(Q_OS_WIN) || defined(Q_OS_MAC) if ((targetAbi.osFlavor() == ProjectExplorer::Abi::HarmattanLinuxFlavor || targetAbi.osFlavor() == ProjectExplorer::Abi::MaemoLinuxFlavor)) arguments << QLatin1String("-unix"); #endif // explicitly add architecture to CONFIG if ((targetAbi.os() == ProjectExplorer::Abi::MacOS) && (targetAbi.binaryFormat() == ProjectExplorer::Abi::MachOFormat)) { if (targetAbi.architecture() == ProjectExplorer::Abi::X86Architecture) { if (targetAbi.wordWidth() == 32) arguments << QLatin1String("CONFIG+=x86"); else if (targetAbi.wordWidth() == 64) arguments << QLatin1String("CONFIG+=x86_64"); } else if (targetAbi.architecture() == ProjectExplorer::Abi::PowerPCArchitecture) { if (targetAbi.wordWidth() == 32) arguments << QLatin1String("CONFIG+=ppc"); else if (targetAbi.wordWidth() == 64) arguments << QLatin1String("CONFIG+=ppc64"); } } QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile()); if (linkQmlDebuggingLibrary() && version) { if (!version->needsQmlDebuggingLibrary()) { // This Qt version has the QML debugging services built in, however // they still need to be enabled at compile time arguments << (version->qtVersion().majorVersion >= 5 ? QLatin1String(Constants::QMAKEVAR_DECLARATIVE_DEBUG5) : QLatin1String(Constants::QMAKEVAR_DECLARATIVE_DEBUG4)); } else { const QString qmlDebuggingHelperLibrary = version->qmlDebuggingHelperLibrary(true); if (!qmlDebuggingHelperLibrary.isEmpty()) { // Do not turn debugger path into native path separators: Qmake does not like that! const QString debuggingHelperPath = QFileInfo(qmlDebuggingHelperLibrary).dir().path(); arguments << QLatin1String(Constants::QMAKEVAR_QMLJSDEBUGGER_PATH) + QLatin1Char('=') + debuggingHelperPath; } } } return arguments; }
/// /// moreArguments, /// iphoneos/iphonesimulator for ios /// QMAKE_VAR_QMLJSDEBUGGER_PATH QStringList QMakeStep::deducedArguments() { QStringList arguments; ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()); ProjectExplorer::Abi targetAbi; if (tc) targetAbi = tc->targetAbi(); // explicitly add architecture to CONFIG if ((targetAbi.os() == ProjectExplorer::Abi::MacOS) && (targetAbi.binaryFormat() == ProjectExplorer::Abi::MachOFormat)) { if (targetAbi.architecture() == ProjectExplorer::Abi::X86Architecture) { if (targetAbi.wordWidth() == 32) arguments << QLatin1String("CONFIG+=x86"); else if (targetAbi.wordWidth() == 64) arguments << QLatin1String("CONFIG+=x86_64"); const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios"; // from Ios::Constants (include header?) QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit()); if (version && version->type() == QLatin1String(IOSQT)) arguments << QLatin1String("CONFIG+=iphonesimulator"); } else if (targetAbi.architecture() == ProjectExplorer::Abi::PowerPCArchitecture) { if (targetAbi.wordWidth() == 32) arguments << QLatin1String("CONFIG+=ppc"); else if (targetAbi.wordWidth() == 64) arguments << QLatin1String("CONFIG+=ppc64"); } else if (targetAbi.architecture() == ProjectExplorer::Abi::ArmArchitecture) { arguments << QLatin1String("CONFIG+=iphoneos"); } } QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit()); if (linkQmlDebuggingLibrary() && version) { arguments << QLatin1String(Constants::QMAKEVAR_QUICK1_DEBUG); if (version->qtVersion().majorVersion >= 5) arguments << QLatin1String(Constants::QMAKEVAR_QUICK2_DEBUG); } return arguments; }