src.qbs 1.83 KB
Newer Older
1
import qbs
2
import qbs.File
3
import qbs.FileInfo
4
5
6
7
8
9
10
11
12
13

Project {
    name: "Sources"
    references: [
        "app/app.qbs",
        "app/app_version_header.qbs",
        "libs/libs.qbs",
        "plugins/plugins.qbs",
        "tools/tools.qbs"
    ]
14
15

    property bool qbsSubModuleExists: File.exists(qbsProject.qbsBaseDir + "/qbs.qbs")
16
    property path qbs_install_dir: qbs.getEnv("QBS_INSTALL_DIR")
17
    property bool useExternalQbs: qbs_install_dir
18
    property bool buildQbsProjectManager: useExternalQbs || qbsSubModuleExists
19
20
21
22
23
24
25
26
    Project {
        name: "qbs"
        id: qbsProject
        property string qbsBaseDir: path + "/shared/qbs"
        condition: qbsSubModuleExists && !useExternalQbs

        property bool enableUnitTests: false
        property bool installApiHeaders: false
27
28
        property string libInstallDir: project.ide_library_path
        property stringList libRPaths:  qbs.targetOS.contains("osx")
29
30
            ? ["@loader_path/" + FileInfo.relativePath(appInstallDir, libInstallDir)]
            : ["$ORIGIN/..", "$ORIGIN/../" + project.ide_library_path]
31
        property string resourcesInstallDir: project.ide_data_path + "/qbs"
32
33
34
        property string pluginsInstallDir: qbs.targetOS.contains("windows")
            ? project.libDirName + "/qtcreator"
            : project.ide_library_path
35
        property string appInstallDir: project.ide_bin_path
36
37
38
        property string relativePluginsPath: FileInfo.relativePath(appInstallDir, pluginsInstallDir)
        property string relativeSearchPath: FileInfo.relativePath(appInstallDir,
                                                                  resourcesInstallDir)
39
40

        references: [
41
            qbsBaseDir + "/src/lib/libs.qbs",
42
            qbsBaseDir + "/src/plugins/plugins.qbs",
43
44
            qbsBaseDir + "/share/share.qbs",
            qbsBaseDir + "/src/app/apps.qbs",
45
46
        ]
    }
47
}