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

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

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