Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Müller <fmueller@owncloud.com>2021-07-23 15:26:25 +0300
committerHannah von Reth <vonreth@kde.org>2021-07-28 16:47:20 +0300
commit2bcdfdc0d88c7fd0cb83ca805bea2a0fdd373079 (patch)
tree8a99b914ed1a12466c53a1ec655a7ef0aa96b585 /src/gui/CMakeLists.txt
parentb2cde9eac21bb63f7f53001886de224b2f204b7f (diff)
Bundle translations using Qt resources system
Diffstat (limited to 'src/gui/CMakeLists.txt')
-rw-r--r--src/gui/CMakeLists.txt19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 4c5a9f873..f12e2ef1a 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -204,8 +204,15 @@ target_link_libraries(owncloud owncloudCore)
find_package(Qt5LinguistTools)
if(Qt5LinguistTools_FOUND)
- qt5_add_translation(client_I18N ${TRANSLATIONS})
- target_sources(owncloud PRIVATE ${client_I18N})
+ # Handle Translations, pick all client_* files from trans directory.
+ file(GLOB client_translations ${CMAKE_SOURCE_DIR}/translations/client_*.ts)
+ qt5_add_translation(client_compiled_translations ${client_translations})
+ target_sources(owncloud PRIVATE ${client_compiled_translations})
+ add_resources_to_target(
+ TARGET owncloud
+ PREFIX translations
+ FILES "${client_compiled_translations}"
+ )
endif()
#TODO Move resources files
@@ -238,19 +245,11 @@ if(NOT APPLE)
endforeach(_file)
endif()
- install(FILES ${client_I18N} DESTINATION ${DATA_INSTALL_DIR}/${APPLICATION_NAME}/i18n)
-
# we may not add MACOSX_BUNDLE here, if not building one
else()
target_sources(owncloud PRIVATE ${OWNCLOUD_BUNDLED_RESOURCES})
set_source_files_properties(
- ${client_I18N}
- PROPERTIES
- MACOSX_PACKAGE_LOCATION Resources/Translations
- )
-
- set_source_files_properties(
${OWNCLOUD_BUNDLED_RESOURCES}
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources