summaryrefslogtreecommitdiffstats
path: root/qtinterface/interface_tqt3/tmoc.cmake
blob: 62334adb188cada5d7cbf1ea848b5a86e54ed011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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