app.qbs 2.32 KB
Newer Older
1 2
import qbs

3
QtcProduct {
4
    Depends { name: "bundle" }
Christian Kandeler's avatar
Christian Kandeler committed
5
    Depends { name: "ib"; condition: qbs.targetOS.contains("macos") }
6

7
    Properties {
Christian Kandeler's avatar
Christian Kandeler committed
8
        condition: qbs.targetOS.contains("macos")
9 10
        ib.appIconName: "qtcreator"
    }
11

12 13 14 15 16 17
    Properties {
        condition: qbs.targetOS.contains("windows")
        consoleApplication: qbs.debugInformation
    }
    consoleApplication: false

18
    type: ["application"]
19 20 21
    name: "qtcreator"
    targetName: qtc.ide_app_target
    version: qtc.qtcreator_version
22

23 24 25
    installDir: bundle.isBundle ? qtc.ide_app_path : qtc.ide_bin_path
    installTags: bundle.isBundle ? ["bundle.content"] : base
    installSourceBase: bundle.isBundle ? buildDirectory : base
26
    property bool qtcRunnable: true
27

Christian Kandeler's avatar
Christian Kandeler committed
28
    cpp.rpaths: qbs.targetOS.contains("macos") ? ["@executable_path/../Frameworks"]
29
                                             : ["$ORIGIN/../" + qtc.libDirName + "/qtcreator"]
30
    cpp.includePaths: [
31 32
        project.sharedSourcesDir + "/qtsingleapplication",
        project.sharedSourcesDir + "/qtlockedfile",
33 34 35 36 37 38 39 40
    ]

    Depends { name: "app_version_header" }
    Depends { name: "Qt"; submodules: ["widgets", "network"] }
    Depends { name: "Utils" }
    Depends { name: "ExtensionSystem" }

    files: [
41
        "Info.plist",
42
        "main.cpp",
43
        "qtcreator.xcassets",
44 45 46 47 48 49 50 51 52 53 54 55
        "qtcreator.rc",
        "../shared/qtsingleapplication/qtsingleapplication.h",
        "../shared/qtsingleapplication/qtsingleapplication.cpp",
        "../shared/qtsingleapplication/qtlocalpeer.h",
        "../shared/qtsingleapplication/qtlocalpeer.cpp",
        "../shared/qtlockedfile/qtlockedfile.cpp",
        "../tools/qtcreatorcrashhandler/crashhandlersetup.cpp",
        "../tools/qtcreatorcrashhandler/crashhandlersetup.h"
    ]

    Group {
        name: "qtcreator.sh"
Christian Kandeler's avatar
Christian Kandeler committed
56
        condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos")
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
        files: "../../bin/qtcreator.sh"
        qbs.install: true
        qbs.installDir: "bin"
    }

    Group {
        name: "QtLockedFile_unix"
        condition: qbs.targetOS.contains("unix")
        files: [
            "../shared/qtlockedfile/qtlockedfile_unix.cpp"
        ]
    }

    Group {
        name: "QtLockedFile_win"
        condition: qbs.targetOS.contains("windows")
        files: [
            "../shared/qtlockedfile/qtlockedfile_win.cpp"
        ]
    }
}