From fb28f6800864176be2ffca29e8e664b641f33170 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 21 Dec 2009 18:04:02 +0000 Subject: m3 is copied into trunk, we should be good to go, now. --- share/include/qt4.bld | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 share/include/qt4.bld (limited to 'share/include') 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 @@ + +function qt_uiToH() +{ + if "${UI_DIR}" == "" then + { + DIR = INPUT.dirName(); + } + else + { + DIR = UI_DIR; + } + FILE = INPUT.fileName(); + OUTFILE = FILE.replace(".ui",".h"); + return "${DIR}/ui_${OUTFILE}"; +} + +rule "qt_ui" +{ + display "ui"; + input "*.ui"; + output INPUT.qt_uiToH(); + tag "headers"; + profile "build" + { + execute("${QTDIR}/bin/uic -o ${OUTPUT} ${INPUT}"); + } +} + +function qt_qrcToCpp() +{ + if "${RCC_DIR}" == "" then + { + DIR = INPUT.dirName(); + } + else + { + DIR = RCC_DIR; + } + FILE = INPUT.fileName(); + OUTFILE = FILE.replace(".qrc",".cpp"); + return "${DIR}/qrc_${OUTFILE}"; +} + +rule "qt_rcc" +{ + display "rcc"; + input "*.qrc"; + output INPUT.qt_qrcToCpp(); + profile "build" + { + NAME = INPUT.fileName().replace(".qrc",""); + execute("${QTDIR}/bin/rcc -name ${NAME} -o ${OUTPUT} ${INPUT}"); + } +} + +function qt_isMocable() +{ + if INPUT.matches("*.h") then + { + if exists( INPUT ) then + { + if "$(grep Q_OBJECT ${INPUT})" != "" then + { + return true; + } + } + } + return false; +} + +function qt_hToMocCpp() +{ + if "${MOC_DIR}" == "" then + { + DIR = INPUT.dirName(); + } + else + { + DIR = MOC_DIR; + } + FILE = INPUT.fileName(); + OUTFILE = FILE.replace(".h",".cpp"); + return "${DIR}/moc_${OUTFILE}"; +} + +rule "qt_moc" +{ + display "moc"; + input qt_isMocable(); + output INPUT.qt_hToMocCpp(); + profile "build" + { + execute("${QTDIR}/bin/moc -o${OUTPUT} ${INPUT}"); + } +} + -- cgit v1.2.3