You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
540 B
22 lines
540 B
14 years ago
|
#!/bin/bash
|
||
|
|
||
|
#
|
||
|
# Very simple moc wrapper, for using with cmake
|
||
|
#
|
||
|
|
||
14 years ago
|
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}" | \
|
||
14 years ago
|
@MOC_EXECUTABLE@ | \
|
||
13 years ago
|
sed "/#include <ntqmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \
|
||
14 years ago
|
> "${out_file}"
|
||
|
fi
|
||
14 years ago
|
else
|
||
14 years ago
|
echo "ERROR: @BIN_INSTALL_DIR@/tqt-replace-stream is not available. tmoc will fail!"
|
||
|
exit 1;
|
||
14 years ago
|
fi
|