src/CMakeLists.txt
changeset 24 f68808ae40b9
parent 23 1cd79bb84e9c
child 25 a0fad312ea30
--- 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)