summaryrefslogtreecommitdiffstats
path: root/src/linguist/linguist/doc/snippets/cmake-macros/examples.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/linguist/linguist/doc/snippets/cmake-macros/examples.cmake')
-rw-r--r--src/linguist/linguist/doc/snippets/cmake-macros/examples.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/linguist/linguist/doc/snippets/cmake-macros/examples.cmake b/src/linguist/linguist/doc/snippets/cmake-macros/examples.cmake
new file mode 100644
index 000000000..542ba7a6f
--- /dev/null
+++ b/src/linguist/linguist/doc/snippets/cmake-macros/examples.cmake
@@ -0,0 +1,13 @@
+#! [qt5_add_translation]
+qt5_add_translation(qmFiles helloworld_en.ts helloworld_de.ts)
+#! [qt5_add_translation]
+
+#! [qt5_add_translation_output_location]
+set(TS_FILES helloworld_en.ts helloworld_de.ts)
+set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "l10n")
+qt5_add_translation(qmFiles ${TS_FILES})
+#! [qt5_add_translation_output_location]
+
+#! [qt5_create_translation]
+qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} helloworld_en.ts helloworld_de.ts)
+#! [qt5_create_translation]