chore: update the file

This commit is contained in:
x-tools-author 2025-08-23 16:05:46 +08:00
parent 4a0ba8397c
commit 7445c1e05b

View File

@ -22,8 +22,14 @@ function(x_generate_module_translations module_name dir recurse)
file(GLOB files ${dir}/*.h ${dir}/*.cpp ${dir}/*.ui)
endif()
qt_add_lupdate(TS_FILES ${ts_files} LUPDATE_TARGET ${module_name}_lupdate SOURCES ${files})
if(APPLE)
set(out_dir "MacOS/translations/${module_name}")
set_source_files_properties(${xTools_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION ${out_dir})
else()
set(out_dir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations/${module_name}")
set_source_files_properties(${ts_files} PROPERTIES OUTPUT_LOCATION ${out_dir})
endif()
qt_add_lrelease(TS_FILES ${ts_files} LRELEASE_TARGET ${module_name}_lrelease)
set_property(TARGET ${module_name}_lupdate PROPERTY FOLDER "i18n")
set_property(TARGET ${module_name}_lrelease PROPERTY FOLDER "i18n")