Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7.2
-
None
-
-
80480b06e (dev), d27b63e48 (6.8)
Description
Consider a project like this
cmake_minimum_required(VERSION 3.24) project(untitled2 VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 REQUIRED COMPONENTS Widgets LinguistTools) qt_standard_project_setup(I18N_TRANSLATED_LANGUAGES de) set(PROJECT_SOURCES main.cpp mainwindow.cpp mainwindow.h mainwindow.ui ) qt_add_executable(untitled2 ${PROJECT_SOURCES} ) target_link_libraries(untitled2 PRIVATE Qt6::Widgets) qt_add_translations(untitled2)
There's no good way to get the list of .ts files that were automatically created by qt_add_translations. I'd like to be able to do something like this:
qt_add_translations(untitled2 TS_FILES_OUTPUT_VARIABLE ts_files) target_sources(untitled2 PRIVATE ${ts_files}) set_source_files_properties(${ts_files} PROPERTIES HEADER_FILE_ONLY ON) source_group(Translations REGULAR_EXPRESSION "\\.ts$")
Attachments
Issue Links
- relates to
-
QTBUG-127052 qt_add_translations does not add the generated .ts files to the source list of the target
- Closed