summaryrefslogtreecommitdiffstats
path: root/qtinterface/tmoc.cmake
blob: 7745e22f4dd4c7c7a75ebfb494f8e6009bdaddd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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"
	@CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \
        @QT_MOC_EXECUTABLE@ | \
        sed "/#include <qmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \
	> "${out_file}"
fi