aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/qt/gui/qtgui.qbs
blob: 2a300a00c211c6a0ae810253f6b6d1cc074500f2 (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
import qbs.base 1.0
import qbs.fileinfo 1.0 as FileInfo
import '../QtModule.qbs' as QtModule

QtModule {
    qtModuleName: "Gui"

    Depends { id: qtcore; name: "Qt.core" }

    FileTagger {
        pattern: "*.ui"
        fileTags: ["ui"]
    }

    Rule {
        inputs: ["ui"]

        Artifact {
//  ### TODO we want to access the module's property "qtcore.generatedFilesDir" here. But without evaluating all available properties a priori.
//            fileName: input.baseDir + '/qrc_' + input.baseName + '.cpp'
            fileName: 'GeneratedFiles/' + product.name + '/ui_' + input.baseName + '.h'
            fileTags: ["hpp"]
        }

        prepare: {
            var cmd = new Command(product.module.binPath + '/uic', [input.fileName, '-o', output.fileName])
            cmd.description = 'uic ' + FileInfo.fileName(input.fileName);
            cmd.highlight = 'codegen';
            return cmd;
        }
    }
}