mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-04 11:17:31 +01:00
29 lines
869 B
CMake
29 lines
869 B
CMake
if(UPDATE_TRANSLATIONS)
|
|
# Regenerate "en" .ts file.
|
|
#
|
|
# "en" .ts file is only used as "source" language
|
|
# and it is not offered in RSS Guard as localization.
|
|
file(GLOB_RECURSE ALL_SOURCES
|
|
"${CMAKE_SOURCE_DIR}/src/librssguard/*.cpp"
|
|
"${CMAKE_SOURCE_DIR}/src/librssguard/*.h"
|
|
"${CMAKE_SOURCE_DIR}/src/librssguard/*.ui")
|
|
|
|
qt_add_lupdate(rssguard
|
|
TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/rssguard_en.ts"
|
|
SOURCES ${ALL_SOURCES}
|
|
INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/src/librssguard"
|
|
OPTIONS "-no-obsolete")
|
|
endif()
|
|
|
|
# Collect all .ts files and generate .qm files.
|
|
FILE(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.ts)
|
|
|
|
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
qt_add_translation(QM_FILES
|
|
${TS_FILES}
|
|
OPTIONS "-compress"
|
|
)
|
|
|
|
add_custom_target(update_qm DEPENDS ${QM_FILES})
|