qtcreator.qbs 2.59 KB
Newer Older
1
import qbs 1.0
Joerg Bornemann's avatar
Joerg Bornemann committed
2 3

Project {
4
    minimumQbsVersion: "1.3"
5
    property bool withAutotests: qbs.buildVariant === "debug"
Eike Ziller's avatar
Eike Ziller committed
6
    property string ide_version_major: '3'
Eike Ziller's avatar
Eike Ziller committed
7 8
    property string ide_version_minor: '2'
    property string ide_version_release: '81'
Joerg Bornemann's avatar
Joerg Bornemann committed
9
    property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release
Eike Ziller's avatar
Eike Ziller committed
10
    property string ide_compat_version_major: '3'
Eike Ziller's avatar
Eike Ziller committed
11 12
    property string ide_compat_version_minor: '2'
    property string ide_compat_version_release: '81'
Eike Ziller's avatar
Eike Ziller committed
13
    property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release
14
    property path ide_source_tree: path
Joerg Bornemann's avatar
Joerg Bornemann committed
15 16
    property string ide_app_path: qbs.targetOS.contains("osx") ? "" : "bin"
    property string ide_app_target: qbs.targetOS.contains("osx") ? "Qt Creator" : "qtcreator"
17 18 19
    property pathList additionalPlugins: []
    property pathList additionalLibs: []
    property pathList additionalTools: []
20
    property string libDirName: "lib"
21
    property string ide_library_path: {
Joerg Bornemann's avatar
Joerg Bornemann committed
22
        if (qbs.targetOS.contains("osx"))
23
            return ide_app_target + ".app/Contents/PlugIns"
Joerg Bornemann's avatar
Joerg Bornemann committed
24
        else if (qbs.targetOS.contains("windows"))
25 26
            return ide_app_path
        else
27
            return libDirName + "/qtcreator"
28 29
    }
    property string ide_plugin_path: {
Joerg Bornemann's avatar
Joerg Bornemann committed
30
        if (qbs.targetOS.contains("osx"))
31
            return ide_library_path
Joerg Bornemann's avatar
Joerg Bornemann committed
32
        else if (qbs.targetOS.contains("windows"))
33
            return libDirName + "/qtcreator/plugins"
34 35 36
        else
            return ide_library_path + "/plugins"
    }
Joerg Bornemann's avatar
Joerg Bornemann committed
37
    property string ide_data_path: qbs.targetOS.contains("osx")
Joerg Bornemann's avatar
Joerg Bornemann committed
38 39
            ? ide_app_target + ".app/Contents/Resources"
            : "share/qtcreator"
Joerg Bornemann's avatar
Joerg Bornemann committed
40
    property string ide_libexec_path: qbs.targetOS.contains("osx")
Joerg Bornemann's avatar
Joerg Bornemann committed
41 42
            ? ide_data_path
            : ide_app_path
Joerg Bornemann's avatar
Joerg Bornemann committed
43
    property string ide_doc_path: qbs.targetOS.contains("osx")
Joerg Bornemann's avatar
Joerg Bornemann committed
44 45
            ? ide_data_path + "/doc"
            : "share/doc/qtcreator"
Joerg Bornemann's avatar
Joerg Bornemann committed
46
    property string ide_bin_path: qbs.targetOS.contains("osx")
Joerg Bornemann's avatar
Joerg Bornemann committed
47 48
            ? ide_app_target + ".app/Contents/MacOS"
            : ide_app_path
49
    property bool testsEnabled: qbs.getEnv("TEST") || qbs.buildVariant === "debug"
50 51
    property stringList generalDefines: [
        "QT_CREATOR",
52
        'IDE_LIBRARY_BASENAME="' + libDirName + '"',
53 54 55
        "QT_NO_CAST_TO_ASCII",
        "QT_NO_CAST_FROM_ASCII"
    ].concat(testsEnabled ? ["WITH_TESTS"] : [])
56
    qbsSearchPaths: "qbs"
Joerg Bornemann's avatar
Joerg Bornemann committed
57 58

    references: [
59
        "src/src.qbs",
Joerg Bornemann's avatar
Joerg Bornemann committed
60
        "share/share.qbs",
61
        "share/qtcreator/translations/translations.qbs",
62
        "tests/tests.qbs"
Joerg Bornemann's avatar
Joerg Bornemann committed
63 64
    ]
}