mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00

many translations are bogus now and have to be reviewed thus translations will be done anew Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
27 lines
960 B
CMake
27 lines
960 B
CMake
file(GLOB TRANSLATIONS "*.po")
|
|
|
|
foreach(tmpres ${TRANSLATIONS})
|
|
get_filename_component(resource "${tmpres}" ABSOLUTE)
|
|
get_filename_component(rscname "${resource}" NAME_WE)
|
|
make_directory("${CMAKE_CURRENT_BINARY_DIR}")
|
|
set(rscout "${CMAKE_CURRENT_BINARY_DIR}/${rscname}.mo")
|
|
if("${rscname}" MATCHES "qt_tools")
|
|
set(rscbase "qt_tools")
|
|
string(REPLACE "qt_tools_" "" rsclocale "${rscname}")
|
|
else()
|
|
set(rscbase "qt")
|
|
string(REPLACE "qt_" "" rsclocale "${rscname}")
|
|
endif()
|
|
add_custom_target(
|
|
${FORTARGET}_${rscname} ALL
|
|
COMMAND ${INTL_MSGFMT} -v "${resource}" -o "${rscout}"
|
|
COMMENT "Generating ${rscname}.mo"
|
|
)
|
|
set_source_files_properties("${rscout}" PROPERTIES GENERATED TRUE)
|
|
install(
|
|
FILES "${rscout}"
|
|
DESTINATION "${KATIE_TRANSLATIONS_PATH}/${rsclocale}/LC_MESSAGES"
|
|
RENAME "${rscbase}.mo"
|
|
COMPONENT Runtime
|
|
)
|
|
endforeach()
|