[rkward-cvs] SF.net SVN: rkward: [2248] branches/KDE4_port/po/CMakeLists.txt

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Nov 19 00:52:24 UTC 2007


Revision: 2248
          http://rkward.svn.sourceforge.net/rkward/?rev=2248&view=rev
Author:   tfry
Date:     2007-11-18 16:52:23 -0800 (Sun, 18 Nov 2007)

Log Message:
-----------
For a simple compile from source, only msgfmt is needed from the gettext package

Modified Paths:
--------------
    branches/KDE4_port/po/CMakeLists.txt

Modified: branches/KDE4_port/po/CMakeLists.txt
===================================================================
--- branches/KDE4_port/po/CMakeLists.txt	2007-11-19 00:46:37 UTC (rev 2247)
+++ branches/KDE4_port/po/CMakeLists.txt	2007-11-19 00:52:23 UTC (rev 2248)
@@ -1,14 +1,20 @@
-FIND_PACKAGE (Gettext REQUIRED)
+FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
 
-ADD_CUSTOM_TARGET(translations ALL)
+IF(NOT GETTEXT_MSGFMT_EXECUTABLE)
+	MESSAGE("msgfmt not found. Translations will *not* be installed")
+ELSE(NOT GETTEXT_MSGFMT_EXECUTABLE)
 
-FILE(GLOB PO_FILES *.po)
+	ADD_CUSTOM_TARGET(translations ALL)
+	
+	FILE(GLOB PO_FILES *.po)
+	
+	FOREACH(_poFile ${PO_FILES})
+		GET_FILENAME_COMPONENT(_basename ${_poFile} NAME_WE)
+		SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
+		ADD_CUSTOM_COMMAND(TARGET translations
+			COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_poFile}
+			DEPENDS ${_poFile})
+		INSTALL(FILES ${_gmoFile} DESTINATION ${LOCALE_INSTALL_DIR}/${_basename}/LC_MESSAGES/ RENAME ${_basename}.mo)
+	ENDFOREACH(_poFile ${PO_FILES})
 
-FOREACH(_poFile ${PO_FILES})
-	GET_FILENAME_COMPONENT(_basename ${_poFile} NAME_WE)
-	SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
-	ADD_CUSTOM_COMMAND(TARGET translations
-		COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_poFile}
-		DEPENDS ${_poFile})
-	INSTALL(FILES ${_gmoFile} DESTINATION ${LOCALE_INSTALL_DIR}/${_basename}/LC_MESSAGES/ RENAME ${_basename}.mo)
-ENDFOREACH(_poFile ${PO_FILES})
+ENDIF(NOT GETTEXT_MSGFMT_EXECUTABLE)
\ No newline at end of file


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list