diff options
author | Lucie GĂ©rard <lucie.gerard@qt.io> | 2021-09-08 13:32:24 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-11-04 16:40:20 +0100 |
commit | fef09af893f0d6cc473c93f54ab3e42d10508001 (patch) | |
tree | 2842021d69127a2ecc0d12644833cb579df9f6df /examples/linguist/hellotr | |
parent | 237e5487597ec9ea0e1838cfb894e07d07f94e46 (diff) |
Add missing CMake commands in the linguist examples
Also, extend the documentation of the arrowpad and hellotr examples to
cover the CMake commands used to produce translations.
Fixes: QTBUG-96162
Change-Id: Ib6d6adb32709c34eb0feb8befdf2d8e66a59ca53
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/linguist/hellotr')
-rw-r--r-- | examples/linguist/hellotr/CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/linguist/hellotr/CMakeLists.txt b/examples/linguist/hellotr/CMakeLists.txt index 74cb0e05a..9f9fb085d 100644 --- a/examples/linguist/hellotr/CMakeLists.txt +++ b/examples/linguist/hellotr/CMakeLists.txt @@ -18,10 +18,19 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/linguist/hellotr") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) +#! [0] +find_package(Qt6 REQUIRED COMPONENTS LinguistTools) +#! [0] qt_add_executable(hellotr main.cpp ) +#! [1] +qt6_add_translations(hellotr + TS_FILES hellotr_la.ts + QM_FILES_OUTPUT_VARIABLE qm_files) +install(FILES ${qm_files} DESTINATION ${INSTALL_EXAMPLEDIR}) +#! [1] set_target_properties(hellotr PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE |