| 1 |
# Copyright (C) 2022 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: BSD-3-Clause |
| 3 |
|
| 4 |
cmake_minimum_required(VERSION 3.16) |
| 5 |
|
| 6 |
project(test_create_translation_macros) |
| 7 |
|
| 8 |
find_package(Qt6 COMPONENTS Core LinguistTools REQUIRED) |
| 9 |
|
| 10 |
set(my_srcs myi18nobject.cpp) |
| 11 |
|
| 12 |
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/some_dir") |
| 13 |
|
| 14 |
qt_create_translation(qm_files ${my_srcs} myobject_de.ts OPTIONS -pro-debug) # play around with OPTIONS |
| 15 |
|
| 16 |
add_executable(myobject ${my_srcs} ${qm_files}) |
| 17 |
target_link_libraries(myobject Qt::Core) |