Qt 6.11 is out! See what's new in the release
blog
Specifying name of output .qrc file when using qt_add_translations
-
Given the following in the CMake file for a static library:
set(PROJECT_NAME DeepSkyStackerKernel) : qt_add_translations(${PROJECT_NAME} TS_FILE_DIR i18n PLURALS_TS_FILE i18n/${PROJECT_NAME}_en.ts PLURALS_TS_FILE i18n/${PROJECT_NAME}_en_GB.ts )Then, (AFAICT) a qrc file called DeepSkyStackerKernel_translations.qrc will be build dynamically and the .qm files added to that.
I would very much prefer that the output qrc file were called simply "kernel_translations.qrc".
How do I accomplish that?
Thanks, David
-
The following appears to work, but is it the correct way to do it?
qt_add_translations(${PROJECT_NAME} TS_FILE_DIR i18n PLURALS_TS_FILE i18n/${PROJECT_NAME}_en.ts PLURALS_TS_FILE i18n/${PROJECT_NAME}_en_GB.ts QM_FILES_OUTPUT_VARIABLE qm_files ) qt_add_resources(${PROJECT_NAME} "kernel_translations" PREFIX "/i18n" BASE "${CMAKE_CURRENT_BINARY_DIR}" FILES ${qm_files} )