cmake, refactor: Move handling of Qt TS files into locale directory
This change offers a few advantages, such as: - a more readable and cleaner `ts_files.cmake` (see the next commit); - a scoped `ts_files` variable; - improved code locality; - no need to adjust the location of the resulting `*.qm` files.
This commit is contained in:
2 files changed
+14
-7
No files matched your search
@@ -245,13 +245,7 @@ if(qt_lib_type STREQUAL "STATIC_LIBRARY")
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} locale/*.ts)
|
add_subdirectory(locale)
|
||||||
set_source_files_properties(${ts_files} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/locale)
|
|
||||||
if(Qt6_VERSION VERSION_GREATER_EQUAL 6.7)
|
|
||||||
qt6_add_lrelease(TS_FILES ${ts_files} OPTIONS -silent)
|
|
||||||
else()
|
|
||||||
qt6_add_lrelease(bitcoinqt TS_FILES ${ts_files} OPTIONS -silent)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(bitcoin-qt
|
add_executable(bitcoin-qt
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (c) 2025-present The Bitcoin Core developers
|
||||||
|
# Distributed under the MIT software license, see the accompanying
|
||||||
|
# file COPYING or https://opensource.org/license/mit/.
|
||||||
|
|
||||||
|
file(GLOB ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.ts")
|
||||||
|
|
||||||
|
if(Qt6_VERSION VERSION_GREATER_EQUAL 6.7)
|
||||||
|
qt6_add_lrelease(TS_FILES ${ts_files} LRELEASE_TARGET bitcoinqt_lrelease OPTIONS -silent)
|
||||||
|
else()
|
||||||
|
qt6_add_lrelease(bitcoinqt TS_FILES ${ts_files} OPTIONS -silent)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_dependencies(bitcoinqt bitcoinqt_lrelease)
|
||||||
Reference in new issue
Block a user