~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to iris/qcm/universal.qcm

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
-----BEGIN QCMOD-----
 
3
name: Mac universal binary support
 
4
section: project
 
5
arg: universal,Build with Mac universal binary support.
 
6
arg: mac-sdk=[path],Path to Mac universal SDK (PPC host only).
 
7
-----END QCMOD-----
 
8
*/
 
9
 
 
10
#define QC_UNIVERSAL
 
11
bool qc_universal_enabled = false;
 
12
QString qc_universal_sdk;
 
13
 
 
14
//----------------------------------------------------------------------------
 
15
// qc_universal
 
16
//----------------------------------------------------------------------------
 
17
class qc_universal : public ConfObj
 
18
{
 
19
public:
 
20
        qc_universal(Conf *c) : ConfObj(c) {}
 
21
        QString name() const { return "Mac universal binary support"; }
 
22
        QString shortname() const { return "universal"; }
 
23
        QString checkString() const { return QString(); }
 
24
 
 
25
        bool exec()
 
26
        {
 
27
#ifdef Q_OS_MAC
 
28
                if(qc_getenv("QC_UNIVERSAL") == "Y")
 
29
                {
 
30
                        qc_universal_enabled = true;
 
31
 
 
32
                        QString str =
 
33
                        "contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) {\n"
 
34
                        "       CONFIG += x86 ppc\n"
 
35
                        "}\n";
 
36
 
 
37
                        QString sdk = qc_getenv("QC_MAC_SDK");
 
38
                        if(!sdk.isEmpty())
 
39
                        {
 
40
                                str += QString("QMAKE_MAC_SDK = %1\n").arg(sdk);
 
41
                                qc_universal_sdk = sdk;
 
42
                        }
 
43
 
 
44
                        conf->addExtra(str);
 
45
                }
 
46
#endif
 
47
                return true;
 
48
        }
 
49
};