1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Handle correctly several languages

This commit is contained in:
Mathieu Schroeter 2017-02-15 23:11:23 +01:00
parent 61e17ba2d3
commit db1eca9fac

View File

@ -100,15 +100,16 @@ add_custom_target (pot_file ALL ${_all}
gettext_create_translations (${_potFile} ALL ${po})
## Put mo files to appropriate directory
foreach (file ${_gmoFiles})
get_filename_component (_lang ${file} NAME_WE)
set (_out "${CMAKE_CURRENT_BINARY_DIR}/share/locale/${_lang}/LC_MESSAGES")
get_filename_component (_langs ${_gmoFile} NAME_WE)
set (_out "${CMAKE_CURRENT_BINARY_DIR}/share/locale/${_langs}/LC_MESSAGES")
add_custom_command (OUTPUT ${_out}/planetblupi.mo
COMMAND ${CMAKE_COMMAND} -E copy ${file} ${_out}/planetblupi.mo
DEPENDS ${file}
)
add_custom_command (OUTPUT ${_out}/planetblupi.mo
COMMAND ${CMAKE_COMMAND} -E copy ${_gmoFile} ${_out}/planetblupi.mo
DEPENDS ${_gmoFile}
)
add_custom_target (gmo_files ALL ${_all}
DEPENDS ${_out}/planetblupi.mo
)
add_custom_target ("po-${_lang}" ALL ${_all}
DEPENDS ${_out}/planetblupi.mo
)
endforeach (file)