Merge bitcoin/bitcoin#32651: cmake: Replace deprecated qt6_add_translation with qt6_add_lrelease

18cf727429 cmake: Replace deprecated `qt6_add_translation` with `qt6_add_lrelease` (Hennadii Stepanov)

Pull request description:

  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

ACKs for top commit:
  fanquake:
    ACK 18cf727429

Tree-SHA512: 10a4023b24d2936a41b8049063b0e210b76cd4d9c9e22a28de579a211f047b5446785005d6918f0b80c6461960717be62cf9b92b0c66000a95379a41dfa83fd2
This commit is contained in:
merge-script
2025-06-04 16:36:23 +02:00

View File

@ -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