diff options
Diffstat (limited to 'qtinterface/tmoc.cmake')
-rwxr-xr-x | qtinterface/tmoc.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qtinterface/tmoc.cmake b/qtinterface/tmoc.cmake new file mode 100755 index 0000000..7745e22 --- /dev/null +++ b/qtinterface/tmoc.cmake @@ -0,0 +1,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 |