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

Project {
4
    property bool withAutotests: qbs.buildVariant === "debug"
Eike Ziller's avatar
Eike Ziller committed
5
    property string ide_version_major: '3'
Eike Ziller's avatar
Eike Ziller committed
6
    property string ide_version_minor: '1'
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
    property string ide_compat_version_major: '3'
Eike Ziller's avatar
Eike Ziller committed
10
    property string ide_compat_version_minor: '1'
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 libDirName: "lib"
20
    property string ide_library_path: {
Joerg Bornemann's avatar
Joerg Bornemann committed
21
        if (qbs.targetOS.contains("osx"))
22
            return ide_app_target + ".app/Contents/PlugIns"
Joerg Bornemann's avatar
Joerg Bornemann committed
23
        else if (qbs.targetOS.contains("windows"))
24 25
            return ide_app_path
        else
26
            return libDirName + "/qtcreator"
27 28
    }
    property string ide_plugin_path: {
Joerg Bornemann's avatar
Joerg Bornemann committed
29
        if (qbs.targetOS.contains("osx"))
30
            return ide_library_path
Joerg Bornemann's avatar
Joerg Bornemann committed
31
        else if (qbs.targetOS.contains("windows"))
32
            return libDirName + "/qtcreator/plugins"
33 34 35
        else
            return ide_library_path + "/plugins"
    }
Joerg Bornemann's avatar
Joerg Bornemann committed
36
    property string ide_data_path: qbs.targetOS.contains("osx")
Joerg Bornemann's avatar
Joerg Bornemann committed
37 38
            ? ide_app_target + ".app/Contents/Resources"
            : "share/qtcreator"
Joerg Bornemann's avatar
Joerg Bornemann committed
39
    property string ide_libexec_path: qbs.targetOS.contains("osx")
Joerg Bornemann's avatar
Joerg Bornemann committed
40 41
            ? ide_data_path
            : ide_app_path
Joerg Bornemann's avatar
Joerg Bornemann committed
42
    property string ide_doc_path: qbs.targetOS.contains("osx")
Joerg Bornemann's avatar
Joerg Bornemann committed
43 44
            ? ide_data_path + "/doc"
            : "share/doc/qtcreator"
Joerg Bornemann's avatar
Joerg Bornemann committed
45
    property string ide_bin_path: qbs.targetOS.contains("osx")
Joerg Bornemann's avatar
Joerg Bornemann committed
46 47
            ? ide_app_target + ".app/Contents/MacOS"
            : ide_app_path
48
    property bool testsEnabled: qbs.getEnv("TEST") || qbs.buildVariant === "debug"
49 50
    property stringList generalDefines: [
        "QT_CREATOR",
51
        'IDE_LIBRARY_BASENAME="' + libDirName + '"',
52 53 54 55
        "QT_DISABLE_DEPRECATED_BEFORE=0x040900",
        "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
    ]
}