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.
tqtinterface/qtinterface/interface_tqt3/tmoc.cmake

20 lines
333 B

#!/bin/bash
#
# Very simple moc wrapper, for using with cmake
#
if [ -z "$1" ]; then
echo "Usage: tmoc <input_file> -o <out_file>"
else
input_file="$1"
out_file="$3"
cat "${input_file}" | \
@MOC_EXECUTABLE@ | \
sed "/#include <ntqmetaobject.h>/ i\\
#undef TQT_NO_COMPAT\\
#include \"${input_file}\"\\
" \
> "${out_file}"
fi