Changeset View
Changeset View
Standalone View
Standalone View
src/qt/CMakeLists.txt
Show First 20 Lines • Show All 420 Lines • ▼ Show 20 Lines | add_custom_command( | ||||
DEPENDS | DEPENDS | ||||
bitcoin-qt | bitcoin-qt | ||||
) | ) | ||||
include(DoOrFail) | include(DoOrFail) | ||||
find_program_or_fail(CMAKE_INSTALL_NAME_TOOL "install_name_tool") | find_program_or_fail(CMAKE_INSTALL_NAME_TOOL "install_name_tool") | ||||
find_program_or_fail(CMAKE_OTOOL "otool") | find_program_or_fail(CMAKE_OTOOL "otool") | ||||
set(QT_INSTALLER_SUPPORTED_LANGUAGES | set(QT_BASE_TRANSLATIONS | ||||
"da" | "ar" "bg" "ca" "cs" "da" "de" "es" "fa" "fi" "fr" "gd" "gl" "he" "hu" | ||||
"de" | "it" "ja" "ko" "lt" "lv" "pl" "pt" "ru" "sk" "sl" "sv" "uk" "zh_CN" | ||||
"es" | |||||
"hu" | |||||
"ru" | |||||
"uk" | |||||
"zh_CN" | |||||
"zh_TW" | "zh_TW" | ||||
) | ) | ||||
string(JOIN "," QT_LOCALES ${QT_INSTALLER_SUPPORTED_LANGUAGES}) | string(JOIN "," QT_LOCALES ${QT_BASE_TRANSLATIONS}) | ||||
get_target_property(QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION) | get_target_property(QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION) | ||||
execute_process( | execute_process( | ||||
COMMAND | COMMAND | ||||
"${QMAKE_EXECUTABLE}" | "${QMAKE_EXECUTABLE}" | ||||
-query QT_INSTALL_TRANSLATIONS | -query QT_INSTALL_TRANSLATIONS | ||||
OUTPUT_VARIABLE | OUTPUT_VARIABLE | ||||
QT_TRANSLATION_DIR | QT_TRANSLATION_DIR | ||||
Show All 17 Lines | foreach(_locale ${ARGN}) | ||||
endif() | endif() | ||||
set(_qt_translation_dir_previous _qt_translation_dir) | set(_qt_translation_dir_previous _qt_translation_dir) | ||||
endforeach() | endforeach() | ||||
set(QT_TRANSLATION_DIR ${_qt_translation_dir} PARENT_SCOPE) | set(QT_TRANSLATION_DIR ${_qt_translation_dir} PARENT_SCOPE) | ||||
endfunction() | endfunction() | ||||
get_qt_translation_dir(QT_TRANSLATION_DIR ${QT_INSTALLER_SUPPORTED_LANGUAGES}) | get_qt_translation_dir(QT_TRANSLATION_DIR ${QT_BASE_TRANSLATIONS}) | ||||
if(NOT QT_TRANSLATION_DIR) | if(NOT QT_TRANSLATION_DIR) | ||||
message(FATAL_ERROR "Qt translation files are not found") | message(FATAL_ERROR "Qt translation files are not found") | ||||
endif() | endif() | ||||
set(MACDEPLOY_DIR "${CMAKE_SOURCE_DIR}/contrib/macdeploy") | set(MACDEPLOY_DIR "${CMAKE_SOURCE_DIR}/contrib/macdeploy") | ||||
set(MACDEPLOYQTPLUS "${MACDEPLOY_DIR}/macdeployqtplus") | set(MACDEPLOYQTPLUS "${MACDEPLOY_DIR}/macdeployqtplus") | ||||
set(DMG_DIST "${CMAKE_BINARY_DIR}/dist") | set(DMG_DIST "${CMAKE_BINARY_DIR}/dist") | ||||
add_custom_command( | add_custom_command( | ||||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |