pull/1/head
Timothy Pearson 13 years ago
parent 8787bdc0f0
commit 13abd09504

@ -109,7 +109,7 @@ install(
##### tqt tools #################################
configure_file( tmoc.cmake tmoc @ONLY )
configure_file( ${IFACE}/tmoc.cmake tmoc @ONLY )
if ( NOT HAVE_REAL_TQT )
configure_file( tqt-replace.cmake tqt-replace @ONLY )
configure_file( tqt-replace-stream.cmake tqt-replace-stream @ONLY )

@ -0,0 +1,21 @@
#!/bin/bash
#
# Very simple moc wrapper, for using with cmake
#
if [ -f @BIN_INSTALL_DIR@/tqt-replace-stream ]; then
if [ -z "$1" ]; then
echo "Usage: tmoc <input_file> -o <out_file>"
else
input_file="$1"
out_file="$3"
@BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \
@MOC_EXECUTABLE@ | \
sed "/#include <qmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \
> "${out_file}"
fi
else
echo "ERROR: @BIN_INSTALL_DIR@/tqt-replace-stream is not available. tmoc will fail!"
exit 1;
fi
Loading…
Cancel
Save