aboutsummaryrefslogtreecommitdiff
path: root/share/include
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-21 18:04:02 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-21 18:04:02 +0000
commitfb28f6800864176be2ffca29e8e664b641f33170 (patch)
treeba9180ac442939edc4eacbe1fdae93c5a7f87cee /share/include
parent51e21a316be6e052251b3dfc7d671061ebd67cee (diff)
downloadbuild-fb28f6800864176be2ffca29e8e664b641f33170.tar.gz
build-fb28f6800864176be2ffca29e8e664b641f33170.tar.bz2
build-fb28f6800864176be2ffca29e8e664b641f33170.tar.xz
build-fb28f6800864176be2ffca29e8e664b641f33170.zip
m3 is copied into trunk, we should be good to go, now.
Diffstat (limited to '')
-rw-r--r--share/include/qt4.bld96
1 files changed, 96 insertions, 0 deletions
diff --git a/share/include/qt4.bld b/share/include/qt4.bld
new file mode 100644
index 0000000..749cc52
--- /dev/null
+++ b/share/include/qt4.bld
@@ -0,0 +1,96 @@
1
2function qt_uiToH()
3{
4 if "${UI_DIR}" == "" then
5 {
6 DIR = INPUT.dirName();
7 }
8 else
9 {
10 DIR = UI_DIR;
11 }
12 FILE = INPUT.fileName();
13 OUTFILE = FILE.replace(".ui",".h");
14 return "${DIR}/ui_${OUTFILE}";
15}
16
17rule "qt_ui"
18{
19 display "ui";
20 input "*.ui";
21 output INPUT.qt_uiToH();
22 tag "headers";
23 profile "build"
24 {
25 execute("${QTDIR}/bin/uic -o ${OUTPUT} ${INPUT}");
26 }
27}
28
29function qt_qrcToCpp()
30{
31 if "${RCC_DIR}" == "" then
32 {
33 DIR = INPUT.dirName();
34 }
35 else
36 {
37 DIR = RCC_DIR;
38 }
39 FILE = INPUT.fileName();
40 OUTFILE = FILE.replace(".qrc",".cpp");
41 return "${DIR}/qrc_${OUTFILE}";
42}
43
44rule "qt_rcc"
45{
46 display "rcc";
47 input "*.qrc";
48 output INPUT.qt_qrcToCpp();
49 profile "build"
50 {
51 NAME = INPUT.fileName().replace(".qrc","");
52 execute("${QTDIR}/bin/rcc -name ${NAME} -o ${OUTPUT} ${INPUT}");
53 }
54}
55
56function qt_isMocable()
57{
58 if INPUT.matches("*.h") then
59 {
60 if exists( INPUT ) then
61 {
62 if "$(grep Q_OBJECT ${INPUT})" != "" then
63 {
64 return true;
65 }
66 }
67 }
68 return false;
69}
70
71function qt_hToMocCpp()
72{
73 if "${MOC_DIR}" == "" then
74 {
75 DIR = INPUT.dirName();
76 }
77 else
78 {
79 DIR = MOC_DIR;
80 }
81 FILE = INPUT.fileName();
82 OUTFILE = FILE.replace(".h",".cpp");
83 return "${DIR}/moc_${OUTFILE}";
84}
85
86rule "qt_moc"
87{
88 display "moc";
89 input qt_isMocable();
90 output INPUT.qt_hToMocCpp();
91 profile "build"
92 {
93 execute("${QTDIR}/bin/moc -o${OUTPUT} ${INPUT}");
94 }
95}
96