diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-07-22 09:36:17 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-07-22 09:36:17 +0200 |
commit | 0ec749317cfa36e68150dd634c2c9ffdb8027588 (patch) | |
tree | 61fd68af7f8f570b5efbe8537601a6d1830b5408 /cmake/Modules | |
parent | bc05bd8b59af9cef363cebf320f65a5283b0dea6 (diff) | |
download | minetest-0ec749317cfa36e68150dd634c2c9ffdb8027588.tar.gz minetest-0ec749317cfa36e68150dd634c2c9ffdb8027588.tar.bz2 minetest-0ec749317cfa36e68150dd634c2c9ffdb8027588.zip |
Refactor mo creation/installation
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/FindGettextLib.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cmake/Modules/FindGettextLib.cmake b/cmake/Modules/FindGettextLib.cmake index f7ac8de5d..31b261539 100644 --- a/cmake/Modules/FindGettextLib.cmake +++ b/cmake/Modules/FindGettextLib.cmake @@ -53,4 +53,13 @@ IF(GETTEXT_INCLUDE_DIR AND GETTEXT_MSGFMT) ENDIF(WIN32) ENDIF() - +IF(GETTEXT_FOUND) + SET(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po) + SET(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES) + SET(GETTEXT_MO_DEST_PATH locale/<locale>/LC_MESSAGES) + FILE(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*") + MACRO(SET_MO_PATHS _buildvar _destvar _locale) + STRING(REPLACE "<locale>" ${_locale} ${_buildvar} ${GETTEXT_MO_BUILD_PATH}) + STRING(REPLACE "<locale>" ${_locale} ${_destvar} ${GETTEXT_MO_DEST_PATH}) + ENDMACRO(SET_MO_PATHS) +ENDIF() |