aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/ponyphone.qbs
blob: e7ea9dfe411313cc4c9fb4592c6990d652a571d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
    Giddyup, pony pony pony!

    How to setup this crazy horsey platform?
    - install the pony SDK
    - call the following
        qbs config --global ponyphone/substitute theLittlePrancingPony
        qbs config --global ponyphone/sdkInstallPath ~/theLittlePrancingPonySDK
    - stand up and sing the Mr. Ed theme song!
*/

import qbs.base 1.0

GenericGCC {
    property string substitute: qbs.configurationValue('ponyphone/substitute')

    condition: qbs.hostOS == 'linux' && qbs.targetOS == 'linux' && qbs.toolchain == 'gcc' && qbs.platform == 'ponyphone'

    toolchainPrefix: {
        if (architecture == 'i586')
            return architecture + '-' + substitute + '-linux-'
        else if (architecture == 'armv7hl')
            return architecture + '-' + substitute + '-linux-gnueabi-'
        throw "unknown target architecture: " + architecture
    }
    toolchainInstallPath: qbs.configurationValue('ponyphone/sdkInstallPath') + "/" + substitute + "/" + architecture + "/toolchain/bin"
}