Make CMake generate and install mo files
This commit is contained in:
parent
99c51b0b2c
commit
fdbdac79b0
|
@ -1,4 +1,19 @@
|
|||
install(DIRECTORY ca cs de es fi fr hu it ja ko nl pl pt ru sl sv zh_CN
|
||||
DESTINATION ${KICAD_INTERNAT}
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
project( kicad-i18n NONE )
|
||||
|
||||
find_package( Gettext REQUIRED )
|
||||
|
||||
set(LANG_ARRAY ca cs de es fi fr hu it ja ko nl pl pt ru sl sv zh_CN)
|
||||
foreach( LANG ${LANG_ARRAY})
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${LANG})
|
||||
execute_process(COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/${LANG}/kicad.po
|
||||
-o ${CMAKE_BINARY_DIR}/${LANG}/kicad.mo)
|
||||
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/${LANG}
|
||||
DESTINATION share/kicad/internat
|
||||
COMPONENT resources
|
||||
PATTERN ".svn" EXCLUDE)
|
||||
)
|
||||
endforeach()
|
||||
|
||||
|
|
Loading…
Reference in New Issue