Skip to content

Commit e92fc65

Browse files
Merge branch 'master' of github.com:wxMaxima-developers/wxmaxima
2 parents f6d3a4f + d8a5d62 commit e92fc65

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

locales/wxMaxima/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if(GETTEXT_FOUND)
2323
COMMAND ${XGETTEXT} -C -k_ -s -o "wxMaxima.pot" ${POT_SOURCE_FILES}
2424
COMMAND ${CMAKE_COMMAND} -E copy "wxMaxima.pot" "${CMAKE_CURRENT_SOURCE_DIR}/wxMaxima.pot"
2525
COMMENT "Updating the POT-file from the current sourcecode")
26-
26+
2727
foreach(POFILE ${TRANSLATION_FILES})
2828
string(REGEX REPLACE ".*locales/wxMaxima/(.*).po$" "\\1" LANG ${POFILE})
2929

@@ -36,7 +36,10 @@ if(GETTEXT_FOUND)
3636
# 'install' message files in the directory "${CMAKE_BINARY_DIR}/locale/..."
3737
# too (at build time, not at install time), so that running ./wxmaxima-local
3838
# (without installing it) can find the message files and i18n works.
39-
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/locale/${LANG}")
39+
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/locale/${LANG}/LC_MESSAGES")
40+
add_custom_target(wxmaxima-local-${LANG} ALL
41+
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo" "${CMAKE_BINARY_DIR}/locale/${LANG}/LC_MESSAGES/wxMaxima.mo"
42+
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo")
4043

4144
add_custom_target(
4245
${LANG}_po

0 commit comments

Comments
 (0)