--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -26,7 +26,12 @@
INSTALL(PROGRAMS ../scripts/runbot DESTINATION /etc/init.d/
RENAME mcbot)
-EXEC_PROGRAM(msgfmt ../locale ARGS -o de/LC_MESSAGES/mcbot.mo de/mcbot.po)
+FIND_PROGRAM(MSGFMT_PROG msgfmt)
+IF (MSGFMT_PROG)
+ EXEC_PROGRAM(${MSGFMT_PROG} ../locale ARGS -o de/LC_MESSAGES/mcbot.mo de/mcbot.po)
+ELSE(MSGFMT_PROG)
+ MESSAGE(FATAL_ERROR "YOU NEED TO INSTALL gettext")
+ENDIF (MSGFMT_PROG)
# Search required libraries
FIND_LIBRARY(GDBM_LIB NAMES gdbm
@@ -35,5 +40,5 @@
TARGET_LINK_LIBRARIES(mcbot ${GDBM_LIB})
TARGET_LINK_LIBRARIES(dbtool ${GDBM_LIB})
ELSE(GDBM_LIB)
- MESSAGE("YOU NEED TO INSTALL libgdbm-dev")
+ MESSAGE(FATAL_ERROR "YOU NEED TO INSTALL libgdbm-dev")
ENDIF (GDBM_LIB)