summaryrefslogtreecommitdiffstats
path: root/examples/linguist/trollprint/CMakeLists.txt
diff options
context:
space:
mode:
authorLucie GĂ©rard <lucie.gerard@qt.io>2021-09-08 13:32:24 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-11-04 16:40:20 +0100
commitfef09af893f0d6cc473c93f54ab3e42d10508001 (patch)
tree2842021d69127a2ecc0d12644833cb579df9f6df /examples/linguist/trollprint/CMakeLists.txt
parent237e5487597ec9ea0e1838cfb894e07d07f94e46 (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/trollprint/CMakeLists.txt')
-rw-r--r--examples/linguist/trollprint/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/linguist/trollprint/CMakeLists.txt b/examples/linguist/trollprint/CMakeLists.txt
index bb378111f..42d26a75d 100644
--- a/examples/linguist/trollprint/CMakeLists.txt
+++ b/examples/linguist/trollprint/CMakeLists.txt
@@ -18,12 +18,18 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/linguist/trollprint")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS LinguistTools)
qt_add_executable(trollprint
main.cpp
mainwindow.cpp mainwindow.h
printpanel.cpp printpanel.h
)
+qt6_add_translations(trollprint
+ TS_FILES trollprint_pt.ts
+ QM_FILES_OUTPUT_VARIABLE qm_files)
+install(FILES ${qm_files} DESTINATION ${INSTALL_EXAMPLEDIR})
+
set_target_properties(trollprint PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE