mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
CMake: Use installed Qt's translations for packaging
This commit is contained in:
@@ -16,11 +16,6 @@ if (WEBUI)
|
||||
"${qBittorrent_BINARY_DIR}/src/webui/www/translations/webui_translations.qrc" COPYONLY)
|
||||
endif()
|
||||
|
||||
FILE(GLOB QT_TRANSLATIONS "${qBittorrent_SOURCE_DIR}/dist/qt-translations/qtbase_*.qm")
|
||||
foreach(EXTRA_TRANSLATION IN ITEMS "fa" "gl" "lt" "pt" "sl" "sv" "zh_CN")
|
||||
list(APPEND QT_TRANSLATIONS "${qBittorrent_SOURCE_DIR}/dist/qt-translations/qt_${EXTRA_TRANSLATION}.qm")
|
||||
endforeach()
|
||||
|
||||
# Executable target configuration
|
||||
# -----------------------------------------------------------------------------
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -65,16 +60,17 @@ endif()
|
||||
# Additional platform specific configuration
|
||||
# -----------------------------------------------------------------------------
|
||||
# -----------------------------------------------------------------------------
|
||||
set_source_files_properties(${QT_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION translations)
|
||||
set_source_files_properties(
|
||||
"${qBittorrent_SOURCE_DIR}/dist/mac/qt.conf"
|
||||
"${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns"
|
||||
"${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns"
|
||||
PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Resources
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
include(FindQtTranslations)
|
||||
qbt_get_qt_translations(QT_TRANSLATIONS)
|
||||
set_source_files_properties(${QT_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION translations)
|
||||
set_source_files_properties(
|
||||
"${qBittorrent_SOURCE_DIR}/dist/mac/qt.conf"
|
||||
"${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns"
|
||||
"${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns"
|
||||
PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Resources
|
||||
)
|
||||
# provide variables for substitution in dist/mac/Info.plist
|
||||
get_target_property(EXECUTABLE_NAME qbt_app OUTPUT_NAME)
|
||||
# This variable name should be changed once qmake is no longer used. Refer to the discussion in PR #14813
|
||||
|
||||
Reference in New Issue
Block a user