Compatibility to other distributions...
authorMarkus Bröker <mbroeker@largo.dyndns.tv>
Wed, 03 Mar 2010 18:36:54 +0100
changeset 52 c9401e6a62cb
parent 51 5d9aed3948a6
child 53 ec1eec96e433
Compatibility to other distributions... 1) find needs a path parameter and 2) the targets have to be linked against gettext committer: Markus Bröker <mbroeker@largo.homelinux.org>
Makefile
src/CMakeLists.txt
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,6 @@
 	$(MAKE) -C build install
 
 beauty:
-	find -name '*.[ch]' -exec indent {} \;
-	find -name '*.[ch]' -exec eraser {} \;
-	find -name '*~' -exec rm -f {} \;
+	find . -name '*.[ch]' -exec indent {} \;
+	find . -name '*.[ch]' -exec eraser {} \;
+	find . -name '*~' -exec rm -f {} \;
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -36,6 +36,15 @@
 ENDIF (MSGFMT_PROG)
 
 # Search required libraries
+FIND_LIBRARY(GETTEXT_LIB NAMES gettextlib
+	PATHS /usr/lib/ /usr/local/lib)
+IF (GETTEXT_LIB)
+	TARGET_LINK_LIBRARIES(mcbot ${GETTEXT_LIB})
+	TARGET_LINK_LIBRARIES(dbtool ${GETTEXT_LIB})
+ELSE(GETTEXT_LIB)
+	MESSAGE(FATAL_ERROR "YOU NEED TO INSTALL gettext")
+ENDIF (GETTEXT_LIB)
+
 FIND_LIBRARY(GDBM_LIB NAMES gdbm
 	PATHS /usr/lib/ /usr/local/lib)
 IF (GDBM_LIB)