src.qbs 2.08 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
    Project {
        name: "qbs"
        id: qbsProject
22
        property string qbsBaseDir: project.sharedSourcesDir + "/qbs"
23
        condition: qbsSubModuleExists && !useExternalQbs
Christian Kandeler's avatar
Christian Kandeler committed
24
        qbsSearchPaths: [qbsBaseDir + "/qbs-resources"]
25 26

        property bool enableUnitTests: false
Christian Kandeler's avatar
Christian Kandeler committed
27
        property bool enableProjectFileUpdates: true
28
        property bool installApiHeaders: false
29 30
        property string libInstallDir: project.ide_library_path
        property stringList libRPaths:  qbs.targetOS.contains("osx")
31 32
            ? ["@loader_path/" + FileInfo.relativePath(appInstallDir, libInstallDir)]
            : ["$ORIGIN/..", "$ORIGIN/../" + project.ide_library_path]
33
        property string resourcesInstallDir: project.ide_data_path + "/qbs"
Eike Ziller's avatar
Eike Ziller committed
34
        property string pluginsInstallDir: project.ide_plugin_path
35
        property string appInstallDir: project.ide_bin_path
36 37
        property string libexecInstallDir: project.ide_libexec_path
        property string relativeLibexecPath: FileInfo.relativePath(appInstallDir, libexecInstallDir)
38 39 40
        property string relativePluginsPath: FileInfo.relativePath(appInstallDir, pluginsInstallDir)
        property string relativeSearchPath: FileInfo.relativePath(appInstallDir,
                                                                  resourcesInstallDir)
41 42

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