This repository has been archived on 2025-12-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
yachat/iris/qcm/universal.qcm

50 lines
1.1 KiB
Text
Raw Permalink Normal View History

2025-12-25 01:37:49 +05:00
/*
-----BEGIN QCMOD-----
name: Mac universal binary support
section: project
arg: universal,Build with Mac universal binary support.
arg: mac-sdk=[path],Path to Mac universal SDK (PPC host only).
-----END QCMOD-----
*/
#define QC_UNIVERSAL
bool qc_universal_enabled = false;
QString qc_universal_sdk;
//----------------------------------------------------------------------------
// qc_universal
//----------------------------------------------------------------------------
class qc_universal : public ConfObj
{
public:
qc_universal(Conf *c) : ConfObj(c) {}
QString name() const { return "Mac universal binary support"; }
QString shortname() const { return "universal"; }
QString checkString() const { return QString(); }
bool exec()
{
#ifdef Q_OS_MAC
if(qc_getenv("QC_UNIVERSAL") == "Y")
{
qc_universal_enabled = true;
QString str =
"contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) {\n"
" CONFIG += x86 ppc\n"
"}\n";
QString sdk = qc_getenv("QC_MAC_SDK");
if(!sdk.isEmpty())
{
str += QString("QMAKE_MAC_SDK = %1\n").arg(sdk);
qc_universal_sdk = sdk;
}
conf->addExtra(str);
}
#endif
return true;
}
};