rssguard/localization/CMakeLists.txt

20 lines
469 B
CMake
Raw Normal View History

2022-01-31 10:41:17 +01:00
# Collect all .ts files.
2022-01-31 09:14:41 +01:00
FILE(GLOB TS_FILES *.ts)
2022-01-31 09:11:48 +01:00
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}")
2022-01-31 10:41:17 +01:00
# Update .ts file and/or just generate .qm files.
2022-01-31 09:11:48 +01:00
if(UPDATE_TRANSLATIONS)
2022-01-31 10:41:17 +01:00
qt_create_translation(QM_FILES
"${CMAKE_SOURCE_DIR}/src" ${TS_FILES}
OPTIONS "-no-obsolete"
)
2022-01-31 09:11:48 +01:00
else()
2022-01-31 10:41:17 +01:00
qt_add_translation(QM_FILES
${TS_FILES}
OPTIONS "-compress"
)
2022-01-31 09:11:48 +01:00
endif()
add_custom_target(update_qm DEPENDS ${QM_FILES})