utils.qbs 8.55 KB
Newer Older
1
import qbs 1.0
2
import qbs.FileInfo
Joerg Bornemann's avatar
Joerg Bornemann committed
3

4 5
QtcLibrary {
    name: "Utils"
Joerg Bornemann's avatar
Joerg Bornemann committed
6

7 8
    cpp.defines: base.concat([
        "QTCREATOR_UTILS_LIB",
9 10
        "QTC_REL_TOOLS_PATH=\"" + FileInfo.relativePath('/' + project.ide_bin_path,
                                                        '/' + project.ide_libexec_path) + "\""
11
    ])
Christian Kandeler's avatar
Christian Kandeler committed
12 13 14 15 16 17 18 19 20 21 22
    cpp.dynamicLibraries: {
        var libs = [];
        if (qbs.targetOS.contains("windows")) {
            libs.push("user32", "iphlpapi", "ws2_32", "shell32");
        } else if (qbs.targetOS.contains("unix")) {
            if (!qbs.targetOS.contains("osx"))
                libs.push("X11");
            if (!qbs.targetOS.contains("openbsd"))
                libs.push("pthread");
        }
        return libs;
23
    }
Christian Kandeler's avatar
Christian Kandeler committed
24

Eike Ziller's avatar
Eike Ziller committed
25 26 27 28
    Properties {
        condition: qbs.targetOS.contains("osx")
        cpp.frameworks: ["Foundation"]
    }
Joerg Bornemann's avatar
Joerg Bornemann committed
29

30
    Depends { name: "Qt"; submodules: ["concurrent", "network", "qml", "widgets"] }
Joerg Bornemann's avatar
Joerg Bornemann committed
31 32 33
    Depends { name: "app_version_header" }

    files: [
34
        "QtConcurrentTools",
35
        "algorithm.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
36 37
        "annotateditemdelegate.cpp",
        "annotateditemdelegate.h",
38 39
        "ansiescapecodehandler.cpp",
        "ansiescapecodehandler.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
40 41
        "appmainwindow.cpp",
        "appmainwindow.h",
Aurindam Jana's avatar
Aurindam Jana committed
42 43
        "basetreeview.cpp",
        "basetreeview.h",
44 45
        "bracematcher.cpp",
        "bracematcher.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
46
        "buildablehelperlibrary.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
47
        "buildablehelperlibrary.h",
48 49
        "categorysortfiltermodel.cpp",
        "categorysortfiltermodel.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
50 51
        "changeset.cpp",
        "changeset.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
52 53
        "checkablemessagebox.cpp",
        "checkablemessagebox.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
54 55 56 57
        "classnamevalidatinglineedit.cpp",
        "classnamevalidatinglineedit.h",
        "codegeneration.cpp",
        "codegeneration.h",
58 59
        "completinglineedit.cpp",
        "completinglineedit.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
60 61 62 63 64
        "completingtextedit.cpp",
        "completingtextedit.h",
        "consoleprocess.cpp",
        "consoleprocess.h",
        "consoleprocess_p.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
65
        "crumblepath.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
66
        "crumblepath.h",
67
        "declarationmacros.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
68 69 70 71
        "detailsbutton.cpp",
        "detailsbutton.h",
        "detailswidget.cpp",
        "detailswidget.h",
72 73
        "dropsupport.cpp",
        "dropsupport.h",
74 75
        "elfreader.cpp",
        "elfreader.h",
Christian Kandeler's avatar
Christian Kandeler committed
76 77
        "elidinglabel.cpp",
        "elidinglabel.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
78
        "environment.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
79 80 81
        "environment.h",
        "environmentmodel.cpp",
        "environmentmodel.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
82 83
        "execmenu.cpp",
        "execmenu.h",
84
        "executeondestruction.h",
85 86
        "fadingindicator.cpp",
        "fadingindicator.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
87 88 89 90 91 92 93 94
        "faketooltip.cpp",
        "faketooltip.h",
        "fancylineedit.cpp",
        "fancylineedit.h",
        "fancymainwindow.cpp",
        "fancymainwindow.h",
        "fileinprojectfinder.cpp",
        "fileinprojectfinder.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
95
        "filenamevalidatinglineedit.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
96 97 98 99 100
        "filenamevalidatinglineedit.h",
        "filesearch.cpp",
        "filesearch.h",
        "filesystemwatcher.cpp",
        "filesystemwatcher.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
101
        "fileutils.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
102 103 104
        "fileutils.h",
        "filewizardpage.cpp",
        "filewizardpage.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
105
        "filewizardpage.ui",
Joerg Bornemann's avatar
Joerg Bornemann committed
106 107
        "flowlayout.cpp",
        "flowlayout.h",
108
        "functiontraits.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
109
        "historycompleter.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
110
        "historycompleter.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
111
        "hostosinfo.h",
Christian Kandeler's avatar
Christian Kandeler committed
112
        "hostosinfo.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
113 114
        "htmldocextractor.cpp",
        "htmldocextractor.h",
Christian Kandeler's avatar
Christian Kandeler committed
115 116
        "icon.cpp",
        "icon.h",
117 118
        "itemviews.cpp",
        "itemviews.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
119 120 121 122 123
        "json.cpp",
        "json.h",
        "linecolumnlabel.cpp",
        "linecolumnlabel.h",
        "listutils.h",
124 125
        "macroexpander.cpp",
        "macroexpander.h",
126
        "mapreduce.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
127 128
        "navigationtreeview.cpp",
        "navigationtreeview.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
129
        "networkaccessmanager.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
130 131 132
        "networkaccessmanager.h",
        "newclasswidget.cpp",
        "newclasswidget.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
133
        "newclasswidget.ui",
134
        "osspecificaspects.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
135 136 137
        "outputformat.h",
        "outputformatter.cpp",
        "outputformatter.h",
138 139
        "overridecursor.cpp",
        "overridecursor.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
140 141 142 143
        "parameteraction.cpp",
        "parameteraction.h",
        "pathchooser.cpp",
        "pathchooser.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
144
        "pathlisteditor.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
145
        "pathlisteditor.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
146 147
        "persistentsettings.cpp",
        "persistentsettings.h",
hjk's avatar
hjk committed
148 149
        "port.cpp",
        "port.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
150 151
        "portlist.cpp",
        "portlist.h",
152 153
        "progressindicator.cpp",
        "progressindicator.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
154 155
        "projectintropage.cpp",
        "projectintropage.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
156 157
        "projectintropage.ui",
        "proxyaction.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
158
        "proxyaction.h",
Kai Koehne's avatar
Kai Koehne committed
159 160 161
        "proxycredentialsdialog.cpp",
        "proxycredentialsdialog.h",
        "proxycredentialsdialog.ui",
162
        "qtcassert.cpp",
Orgad Shaneh's avatar
Orgad Shaneh committed
163
        "qtcassert.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
164 165
        "qtcolorbutton.cpp",
        "qtcolorbutton.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
166
        "qtcprocess.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
167 168 169
        "qtcprocess.h",
        "reloadpromptutils.cpp",
        "reloadpromptutils.h",
170
        "runextensions.cpp",
Orgad Shaneh's avatar
Orgad Shaneh committed
171 172
        "runextensions.h",
        "savedaction.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
173 174 175
        "savedaction.h",
        "savefile.cpp",
        "savefile.h",
176
        "scopedswap.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
177
        "settingsselector.cpp",
Orgad Shaneh's avatar
Orgad Shaneh committed
178
        "settingsselector.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
179
        "settingsutils.h",
Tobias Hunger's avatar
Tobias Hunger committed
180 181
        "shellcommand.cpp",
        "shellcommand.h",
182 183
        "shellcommandpage.cpp",
        "shellcommandpage.h",
Marco Bubke's avatar
Marco Bubke committed
184
        "sizedarray.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
185 186
        "sleep.cpp",
        "sleep.h",
Marco Bubke's avatar
Marco Bubke committed
187 188 189
        "smallstring.h",
        "smallstringiterator.h",
        "smallstringliteral.h",
190
        "smallstringlayout.h",
Marco Bubke's avatar
Marco Bubke committed
191 192
        "smallstringmemory.h",
        "smallstringvector.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
193 194 195 196 197 198
        "statuslabel.cpp",
        "statuslabel.h",
        "stringutils.cpp",
        "stringutils.h",
        "styledbar.cpp",
        "styledbar.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
199
        "stylehelper.cpp",
Joerg Bornemann's avatar
Joerg Bornemann committed
200 201 202
        "stylehelper.h",
        "synchronousprocess.cpp",
        "synchronousprocess.h",
203 204
        "templateengine.cpp",
        "templateengine.h",
BogDan Vatra's avatar
BogDan Vatra committed
205 206 207 208
        "textfieldcheckbox.cpp",
        "textfieldcheckbox.h",
        "textfieldcombobox.cpp",
        "textfieldcombobox.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
209 210
        "textfileformat.cpp",
        "textfileformat.h",
hjk's avatar
hjk committed
211 212
        "treemodel.cpp",
        "treemodel.h",
Daniel Teske's avatar
Daniel Teske committed
213 214
        "treeviewcombobox.cpp",
        "treeviewcombobox.h",
215 216
        "headerviewstretcher.cpp",
        "headerviewstretcher.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
217 218
        "uncommentselection.cpp",
        "uncommentselection.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
219 220
        "unixutils.cpp",
        "unixutils.h",
Orgad Shaneh's avatar
Orgad Shaneh committed
221
        "utils.qrc",
Joerg Bornemann's avatar
Joerg Bornemann committed
222
        "utils_global.h",
hjk's avatar
hjk committed
223 224
        "winutils.cpp",
        "winutils.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
225 226
        "wizard.cpp",
        "wizard.h",
227 228
        "wizardpage.cpp",
        "wizardpage.h",
Joerg Bornemann's avatar
Joerg Bornemann committed
229 230 231 232 233 234 235
        "images/arrow.png",
        "images/crumblepath-segment-end.png",
        "images/crumblepath-segment-hover-end.png",
        "images/crumblepath-segment-hover.png",
        "images/crumblepath-segment-selected-end.png",
        "images/crumblepath-segment-selected.png",
        "images/crumblepath-segment.png",
236 237 238 239
        "images/progressindicator_big.png",
        "images/progressindicator_big@2x.png",
        "images/progressindicator_small.png",
        "images/progressindicator_small@2x.png",
Joerg Bornemann's avatar
Joerg Bornemann committed
240 241 242
        "images/triangle_vert.png",
    ]

243 244 245 246 247 248 249 250 251 252
    Group {
        name: "Theme"
        prefix: "theme/"
        files: [
            "theme.cpp",
            "theme.h",
            "theme_p.h",
        ]
    }

253
    Group {
254
        name: "Tooltip"
255 256 257 258 259 260 261 262 263 264 265
        prefix: "tooltip/"
        files: [
            "effects.h",
            "reuse.h",
            "tips.cpp",
            "tips.h",
            "tooltip.cpp",
            "tooltip.h",
        ]
    }

Joerg Bornemann's avatar
Joerg Bornemann committed
266
    Group {
267
        name: "WindowsUtils"
Joerg Bornemann's avatar
Joerg Bornemann committed
268
        condition: qbs.targetOS.contains("windows")
Joerg Bornemann's avatar
Joerg Bornemann committed
269 270 271 272 273 274
        files: [
            "consoleprocess_win.cpp",
        ]
    }

    Group {
275
        name: "ConsoleProcess_unix"
Joerg Bornemann's avatar
Joerg Bornemann committed
276
        condition: qbs.targetOS.contains("unix")
Joerg Bornemann's avatar
Joerg Bornemann committed
277 278 279 280 281
        files: [
            "consoleprocess_unix.cpp",
        ]
    }

Eike Ziller's avatar
Eike Ziller committed
282 283 284 285
    Group {
        name: "FileUtils_osx"
        condition: qbs.targetOS.contains("osx")
        files: [
Eike Ziller's avatar
Eike Ziller committed
286
            "fileutils_mac.h", "fileutils_mac.mm",
Eike Ziller's avatar
Eike Ziller committed
287 288 289
        ]
    }

Eike Ziller's avatar
Eike Ziller committed
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
    Group {
        name: "MimeTypes"
        prefix: "mimetypes/"
        files: [
            "mimedatabase.cpp",
            "mimedatabase.h",
            "mimedatabase_p.h",
            "mimeglobpattern.cpp",
            "mimeglobpattern_p.h",
            "mimemagicrule.cpp",
            "mimemagicrule_p.h",
            "mimemagicrulematcher.cpp",
            "mimemagicrulematcher_p.h",
            "mimeprovider.cpp",
            "mimeprovider_p.h",
            "mimetype.cpp",
            "mimetype.h",
            "mimetype_p.h",
            "mimetypeparser.cpp",
            "mimetypeparser_p.h",
        ]
    }

313
    Export {
314
        Depends { name: "Qt"; submodules: ["concurrent", "widgets" ] }
Joerg Bornemann's avatar
Joerg Bornemann committed
315
    }
Joerg Bornemann's avatar
Joerg Bornemann committed
316 317
}