diff options
Diffstat (limited to '')
| -rw-r--r-- | share/include/qt4.bld | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/share/include/qt4.bld b/share/include/qt4.bld index 749cc52..a5a7867 100644 --- a/share/include/qt4.bld +++ b/share/include/qt4.bld | |||
| @@ -1,4 +1,58 @@ | |||
| 1 | 1 | ||
| 2 | function qt_getCXXFLAGS() | ||
| 3 | { | ||
| 4 | if QTDIR == null then | ||
| 5 | { | ||
| 6 | error "QTDIR is not set, cannot find QT tools."; | ||
| 7 | } | ||
| 8 | |||
| 9 | ret = "-D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LI " | ||
| 10 | "-DQT_SHARED -I${QTDIR}/mkspecs/linux-g++ " | ||
| 11 | "$(PKG_CONFIG_PATH=PKG_CONFIG_PATH:${QTDIR}/lib/pkgconfig " | ||
| 12 | "pkg-config --cflags QtCore QtGui ice glu x11 xext libpng freetype2 " | ||
| 13 | "gobject-2.0 sm xrender fontconfig gthread-2.0 glib-2.0)"; | ||
| 14 | if UI_DIR != null then | ||
| 15 | { | ||
| 16 | ret += "-I${UI_DIR}"; | ||
| 17 | } | ||
| 18 | if RCC_DIR != null then | ||
| 19 | { | ||
| 20 | ret += "-I${RCC_DIR}"; | ||
| 21 | } | ||
| 22 | if MOC_DIR != null then | ||
| 23 | { | ||
| 24 | ret += "-I${MOC_DIR}"; | ||
| 25 | } | ||
| 26 | return ret; | ||
| 27 | } | ||
| 28 | |||
| 29 | function qt_getLDFLAGS() | ||
| 30 | { | ||
| 31 | if QTDIR == null then | ||
| 32 | { | ||
| 33 | error "QTDIR is not set, cannot find QT tools."; | ||
| 34 | } | ||
| 35 | |||
| 36 | return "-Wl,-rpath,${QTDIR}/lib $(PKG_CONFIG_PATH=" | ||
| 37 | "PKG_CONFIG_PATH:${QTDIR}/lib/pkgconfig " | ||
| 38 | "pkg-config --libs QtCore QtGui ice glu x11 xext libpng freetype2 " | ||
| 39 | "gobject-2.0 sm xrender fontconfig gthread-2.0 glib-2.0) -laudio -lz " | ||
| 40 | "-lm -ldl"; | ||
| 41 | } | ||
| 42 | |||
| 43 | function qt_getToolPath( TOOL, DEFAULT ) | ||
| 44 | { | ||
| 45 | if QTDIR == null then | ||
| 46 | { | ||
| 47 | error "QTDIR is not set, cannot find QT tools."; | ||
| 48 | } | ||
| 49 | if TOOL == null then | ||
| 50 | { | ||
| 51 | return "${QTDIR}/bin/${DEFAULT}"; | ||
| 52 | } | ||
| 53 | return TOOL; | ||
| 54 | } | ||
| 55 | |||
| 2 | function qt_uiToH() | 56 | function qt_uiToH() |
| 3 | { | 57 | { |
| 4 | if "${UI_DIR}" == "" then | 58 | if "${UI_DIR}" == "" then |
| @@ -22,7 +76,8 @@ rule "qt_ui" | |||
| 22 | tag "headers"; | 76 | tag "headers"; |
| 23 | profile "build" | 77 | profile "build" |
| 24 | { | 78 | { |
| 25 | execute("${QTDIR}/bin/uic -o ${OUTPUT} ${INPUT}"); | 79 | UIC = qt_getToolPath( UIC, "uic" ); |
| 80 | execute("${UIC} -o ${OUTPUT} ${INPUT}"); | ||
| 26 | } | 81 | } |
| 27 | } | 82 | } |
| 28 | 83 | ||
| @@ -48,8 +103,9 @@ rule "qt_rcc" | |||
| 48 | output INPUT.qt_qrcToCpp(); | 103 | output INPUT.qt_qrcToCpp(); |
| 49 | profile "build" | 104 | profile "build" |
| 50 | { | 105 | { |
| 106 | RCC = qt_getToolPath( RCC, "rcc" ); | ||
| 51 | NAME = INPUT.fileName().replace(".qrc",""); | 107 | NAME = INPUT.fileName().replace(".qrc",""); |
| 52 | execute("${QTDIR}/bin/rcc -name ${NAME} -o ${OUTPUT} ${INPUT}"); | 108 | execute("${RCC} -name ${NAME} -o ${OUTPUT} ${INPUT}"); |
| 53 | } | 109 | } |
| 54 | } | 110 | } |
| 55 | 111 | ||
| @@ -90,7 +146,8 @@ rule "qt_moc" | |||
| 90 | output INPUT.qt_hToMocCpp(); | 146 | output INPUT.qt_hToMocCpp(); |
| 91 | profile "build" | 147 | profile "build" |
| 92 | { | 148 | { |
| 93 | execute("${QTDIR}/bin/moc -o${OUTPUT} ${INPUT}"); | 149 | MOC = qt_getToolPath( MOC, "moc" ); |
| 150 | execute("${MOC} -o${OUTPUT} ${INPUT}"); | ||
| 94 | } | 151 | } |
| 95 | } | 152 | } |
| 96 | 153 | ||
