summaryrefslogtreecommitdiffstats
path: root/qtinterface/tmoc.cmake
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-13 02:03:13 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-13 02:03:13 +0000
commitbed8233bbf1c3ae8046945ea876e1ff3ab553c56 (patch)
tree50fa344359ce5253ee1f524d0e0732673a776aa4 /qtinterface/tmoc.cmake
parentb461bd5e526c1598e614a3ee3aa75f4f7bb2e099 (diff)
downloadtqtinterface-bed8233bbf1c3ae8046945ea876e1ff3ab553c56.tar.gz
tqtinterface-bed8233bbf1c3ae8046945ea876e1ff3ab553c56.zip
Add check for @BIN_INSTALL_DIR@/tqt-replace-stream
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1224643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtinterface/tmoc.cmake')
-rwxr-xr-xqtinterface/tmoc.cmake21
1 files changed, 13 insertions, 8 deletions
diff --git a/qtinterface/tmoc.cmake b/qtinterface/tmoc.cmake
index 29cefaf..b733f87 100755
--- a/qtinterface/tmoc.cmake
+++ b/qtinterface/tmoc.cmake
@@ -4,13 +4,18 @@
# Very simple moc wrapper, for using with cmake
#
-if [ -z "$1" ]; then
- echo "Usage: tmoc <input_file> -o <out_file>"
+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}" | \
+ @QT_MOC_EXECUTABLE@ | \
+ sed "/#include <qmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \
+ > "${out_file}"
+ fi
else
- input_file="$1"
- out_file="$3"
- @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}"
+ echo "ERROR: @BIN_INSTALL_DIR@/tqt-replace-stream is not available. tmoc will fail!"
+ exit 1;
fi