Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8.1
-
Windows 10 22H2, MSVC 2022 x64
-
b19b5116a (dev), 0c6abd7df (6.9), 4d3686a50 (6.8), edd8ad8a7 (dev), 6a4f41e7f (dev), f6d4e8e17 (6.9), efcf32f3c (6.9)
Description
Steps to reproduce
1. Load the "hello tr()" example: https://doc.qt.io/qt-6/qtlinguist-hellotr-example.html
2. Replace the section "#! [1]" of CMakeLists.txt with the following, and build the project
#! [1] qt6_add_translations(hellotr # SOURCE_TARGETS hellotr ) # From https://doc.qt.io/qt-6/qtlinguist-cmake-qt-add-translations.html#options set_source_files_properties(hellotr_en.ts hellotr_la.ts PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations") #! [1]
3. Uncomment the line "SOURCE_TARGETS hellotr" and build the project
Outcomes
- (Step #2) The *.qm files get generated in ${CMAKE_CURRENT_BINARY_DIR}/translations (Expected)
- (Step #3) The *.qm files get generated in ${CMAKE_CURRENT_BINARY_DIR} (Not Expected)
Use-case
We want to be able to write something like this:
qt6_add_translations(hellotr SOURCE_TARGETS hellotr TS_FILES_OUTPUT_VARIABLE TS_FILES ) set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations" )
Attachments
Issue Links
- resulted in
-
QTBUG-133724 add TS_OUTPUT_DIRECTORY argument to qt_add_translations
-
- Closed
-
For Gerrit Dashboard: QTBUG-132613 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
621528,3 | Doc: Clarify that OUTPUT_LOCATION must be set early on .ts files | dev | qt/qttools | Status: MERGED | +2 | 0 |
621594,2 | Doc: Clarify that OUTPUT_LOCATION must be set early on .ts files | 6.9 | qt/qttools | Status: MERGED | +2 | 0 |
621660,2 | Doc: Clarify that OUTPUT_LOCATION must be set early on .ts files | 6.8 | qt/qttools | Status: MERGED | +2 | 0 |
623795,3 | CMake: Add the QM_OUTPUT_DIRECTORY argument to qt_add_lrelease | dev | qt/qttools | Status: MERGED | +2 | 0 |
623796,3 | CMake: Add QM_OUTPUT_DIRECTORY argument to qt_add_translations | dev | qt/qttools | Status: MERGED | +2 | 0 |
624084,2 | CMake: Add the QM_OUTPUT_DIRECTORY argument to qt_add_lrelease | 6.9 | qt/qttools | Status: MERGED | +2 | 0 |
624085,2 | CMake: Add QM_OUTPUT_DIRECTORY argument to qt_add_translations | 6.9 | qt/qttools | Status: MERGED | +2 | 0 |