| 1 |
# Copyright (C) 2025 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: BSD-3-Clause |
| 3 |
|
| 4 |
qt_add_executable(app1 main.cpp) |
| 5 |
target_link_libraries(app1 PRIVATE Qt::Gui) |
| 6 |
qt_add_translations(app1 |
| 7 |
NO_GENERATE_PLURALS_TS_FILE |
| 8 |
TS_FILE_BASE app1 |
| 9 |
QM_FILES_OUTPUT_VARIABLE qm_files # unused, but turns off automatic resource generation |
| 10 |
) |
| 11 |
|
| 12 |
# Use qt_add_resources to check whether the .qm file was created where we expected it. |
| 13 |
qt_add_resources(app1 "translations" |
| 14 |
PREFIX "/i18n" |
| 15 |
BASE "${CMAKE_CURRENT_BINARY_DIR}" |
| 16 |
FILES "${CMAKE_CURRENT_BINARY_DIR}/app1_fr.qm" |
| 17 |
) |