aboutsummaryrefslogtreecommitdiff
path: root/smolbote.qbs
blob: 5ad90082fda003cfbd28898fed5c77ce3b808927 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import qbs
import "qbs/GitRepo.js" as GitRepo

Project {
    id: project
    // Qt 5.7 has qbs version 1.6.0
    // Qt 5.8 has qbs version 1.7.0
    minimumQbsVersion: "1.6.0"

    property bool gitVersion: true

    // The following define makes your compiler emit warnings if you use any
    // feature of Qt which as been marked as deprecated (the exact warnings
    // depend on your compiler). Please consult the documentation of the
    // deprecated API in order to know how to port your code away from it.
    property bool deprecatedWarnings: true

    // The code also fails to compile if you use APIs deprecated before Qt 5.7.
    property string deprecatedBefore: "0x050700"

    CppApplication {
        id: poi
        name: "poi"
        property stringList defines: []

        Probe {
            id: git
            property string version: "1.0.0"
            property string describe: "1.0.0-0-00000000"
            configure: {
                if(project.gitVersion) {
                    var meta = GitRepo.read(project.sourceDirectory);
                    version = meta.version;
                    describe = meta.describe;
                }
                found = true;
            }
        }

        cpp.includePaths: ['src', 'src/3rd-party']
        cpp.defines: {
            if(project.deprecatedWarnings)
                defines.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE="+project.deprecatedBefore);
            if(git.found)
                defines.push('VERSION="'+git.version+'"', 'DESCRIBE="'+git.describe+'"');
            return defines;
        }
        Depends { name: "Qt"; submodules: ["core", "widgets", "webengine", "webenginewidgets"] }

        files: [
            "data/resources.qrc",
            "src/blocker/blockermanager.cpp",
            "src/blocker/blockermanager.h",
            "src/blocker/blockerrule.cpp",
            "src/blocker/blockerrule.h",
            "src/blocker/blockersubscription.cpp",
            "src/blocker/blockersubscription.h",
            "src/blocker/regexp.cpp",
            "src/blocker/regexp.h",
            "src/blocker/subscriptiondialog.ui",
            "src/blocker/subscriptionform.ui",
            "src/browser.cpp",
            "src/browser.h",
            "src/forms/bookmarksdialog.cpp",
            "src/forms/bookmarksdialog.h",
            "src/forms/bookmarksdialog.ui",
            "src/forms/downloaddialog.cpp",
            "src/forms/downloaddialog.h",
            "src/forms/downloaddialog.ui",
            "src/forms/profiledialog.cpp",
            "src/forms/profiledialog.h",
            "src/forms/profiledialog.ui",
            "src/main.cpp",
            "src/mainwindow.cpp",
            "src/mainwindow.h",
            "src/mainwindow.ui",
            "src/settings.cpp",
            "src/settings.h",
            "src/webengine/downloaditemform.cpp",
            "src/webengine/downloaditemform.h",
            "src/webengine/downloaditemform.ui",
            "src/webengine/urlinterceptor.cpp",
            "src/webengine/urlinterceptor.h",
            "src/webengine/webengineprofile.cpp",
            "src/webengine/webengineprofile.h",
            "src/webengine/webview.cpp",
            "src/webengine/webview.h",
            "src/widgets/loadingbar.cpp",
            "src/widgets/loadingbar.h",
            "src/widgets/urllineedit.cpp",
            "src/widgets/urllineedit.h",
            "src/widgets/webviewtabbar.cpp",
            "src/widgets/webviewtabbar.h",
            "src/xbel/xbel.cpp",
            "src/xbel/xbel.h",
        ]

        Group {
            name: "Executable"
            fileTagsFilter: product.type
            qbs.install: true
            qbs.installDir: "bin"
        }

        Group {
            name: "Configuration"
            files: [
                "data/poi.conf"
            ]
            qbs.install: true
            qbs.installDir: "share/smolbote"
        }
    }
}