utils.qbs 8.07 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

25 26
    cpp.enableExceptions: true

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

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

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

234 235 236 237 238 239 240 241 242 243
    Group {
        name: "Theme"
        prefix: "theme/"
        files: [
            "theme.cpp",
            "theme.h",
            "theme_p.h",
        ]
    }

244
    Group {
245
        name: "Tooltip"
246 247 248 249 250 251 252 253 254 255 256
        prefix: "tooltip/"
        files: [
            "effects.h",
            "reuse.h",
            "tips.cpp",
            "tips.h",
            "tooltip.cpp",
            "tooltip.h",
        ]
    }

Joerg Bornemann's avatar
Joerg Bornemann committed
257
    Group {
258
        name: "WindowsUtils"
Joerg Bornemann's avatar
Joerg Bornemann committed
259
        condition: qbs.targetOS.contains("windows")
Joerg Bornemann's avatar
Joerg Bornemann committed
260 261 262 263 264 265
        files: [
            "consoleprocess_win.cpp",
        ]
    }

    Group {
266
        name: "ConsoleProcess_unix"
Joerg Bornemann's avatar
Joerg Bornemann committed
267
        condition: qbs.targetOS.contains("unix")
Joerg Bornemann's avatar
Joerg Bornemann committed
268 269 270 271 272
        files: [
            "consoleprocess_unix.cpp",
        ]
    }

Eike Ziller's avatar
Eike Ziller committed
273 274 275 276
    Group {
        name: "FileUtils_osx"
        condition: qbs.targetOS.contains("osx")
        files: [
Eike Ziller's avatar
Eike Ziller committed
277
            "fileutils_mac.h", "fileutils_mac.mm",
Eike Ziller's avatar
Eike Ziller committed
278 279 280
        ]
    }

Eike Ziller's avatar
Eike Ziller committed
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
    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",
        ]
    }

304
    Export {
305
        Depends { name: "Qt"; submodules: ["concurrent", "widgets" ] }
Joerg Bornemann's avatar
Joerg Bornemann committed
306
    }
Joerg Bornemann's avatar
Joerg Bornemann committed
307 308
}