diff options
author | Antenore Gatta <antenore@simbiosi.org> | 2018-07-28 23:33:42 +0300 |
---|---|---|
committer | Antenore Gatta <antenore@simbiosi.org> | 2018-07-28 23:33:42 +0300 |
commit | 2322fed5ffd7ee026dd23ce50b5df75648a556a7 (patch) | |
tree | d6f235964d2d717a1008294c6731d1d59e06db39 /cmake | |
parent | 88944d48fee3f597de2c04ab06f647ed45018c81 (diff) |
Revert broken translationsv1.2.31
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/GETTEXT.cmake | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cmake/GETTEXT.cmake b/cmake/GETTEXT.cmake index 3d9d4bdd6..368a6bec6 100644 --- a/cmake/GETTEXT.cmake +++ b/cmake/GETTEXT.cmake @@ -20,17 +20,17 @@ find_suggested_package(Gettext) function(gettext po_dir package_name) - set(mo_files) - file(GLOB po_files ${po_dir}/*.po) - foreach(po_file ${po_files}) - get_filename_component(lang ${po_file} NAME_WE) - if(("$ENV{LINGUAS}" MATCHES "(^| )${lang}( |$)") OR (NOT DEFINED ENV{LINGUAS})) - set(mo_file ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) - add_custom_command(OUTPUT ${mo_file} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo_file} ${po_file} DEPENDS ${po_file}) - install(FILES ${mo_file} DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${package_name}.mo) - set(mo_files ${mo_files} ${mo_file}) - endif() - endforeach() - set(translations-target "${package_name}-translations") - add_custom_target(${translations-target} ALL DEPENDS ${mo_files}) + set(mo_files) + file(GLOB po_files ${po_dir}/*.po) + foreach(po_file ${po_files}) + get_filename_component(lang ${po_file} NAME_WE) + if(("$ENV{LINGUAS}" MATCHES "(^| )${lang}( |$)") OR (NOT DEFINED ENV{LINGUAS})) + set(mo_file ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) + add_custom_command(OUTPUT ${mo_file} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo_file} ${po_file} DEPENDS ${po_file}) + install(FILES ${mo_file} DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${package_name}.mo) + set(mo_files ${mo_files} ${mo_file}) + endif() + endforeach() + set(translations-target "${package_name}-translations") + add_custom_target(${translations-target} ALL DEPENDS ${mo_files}) endfunction() |