From 18cf727429e967053d6a7468c9a40dc14185af34 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 31 May 2025 08:29:09 +0100 Subject: [PATCH] cmake: Replace deprecated `qt6_add_translation` with `qt6_add_lrelease` See Qt docs: - https://doc.qt.io/archives/qt-6.2/qtlinguist-cmake-qt-add-translation.html - https://doc.qt.io/archives/qt-6.2/qtlinguist-cmake-qt-add-lrelease.html --- src/qt/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 6c853cbf2f..405f6281ff 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -54,13 +54,6 @@ set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC_SEARCH_PATHS forms) -# TODO: The file(GLOB ...) command should be replaced with an explicit -# file list. Such a change must be synced with the corresponding change -# to https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py -file(GLOB ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} locale/*.ts) -set_source_files_properties(${ts_files} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/locale) -qt6_add_translation(qm_files ${ts_files}) - configure_file(bitcoin_locale.qrc bitcoin_locale.qrc USE_SOURCE_PERMISSIONS COPYONLY) # The bitcoinqt sources have to include headers in @@ -250,6 +243,13 @@ if(qt_lib_type STREQUAL "STATIC_LIBRARY") ) endif() +file(GLOB ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} locale/*.ts) +set_source_files_properties(${ts_files} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/locale) +qt6_add_lrelease(bitcoinqt + TS_FILES ${ts_files} + OPTIONS -silent +) + add_executable(bitcoin-qt main.cpp ../init/bitcoin-qt.cpp