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:
parent
61e17ba2d3
commit
db1eca9fac
@ -100,15 +100,16 @@ add_custom_target (pot_file ALL ${_all}
|
|||||||
gettext_create_translations (${_potFile} ALL ${po})
|
gettext_create_translations (${_potFile} ALL ${po})
|
||||||
|
|
||||||
## Put mo files to appropriate directory
|
## 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)
|
add_custom_command (OUTPUT ${_out}/planetblupi.mo
|
||||||
set (_out "${CMAKE_CURRENT_BINARY_DIR}/share/locale/${_langs}/LC_MESSAGES")
|
COMMAND ${CMAKE_COMMAND} -E copy ${file} ${_out}/planetblupi.mo
|
||||||
|
DEPENDS ${file}
|
||||||
|
)
|
||||||
|
|
||||||
add_custom_command (OUTPUT ${_out}/planetblupi.mo
|
add_custom_target ("po-${_lang}" ALL ${_all}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${_gmoFile} ${_out}/planetblupi.mo
|
DEPENDS ${_out}/planetblupi.mo
|
||||||
DEPENDS ${_gmoFile}
|
)
|
||||||
)
|
endforeach (file)
|
||||||
|
|
||||||
add_custom_target (gmo_files ALL ${_all}
|
|
||||||
DEPENDS ${_out}/planetblupi.mo
|
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user