diff --git a/cmake/x_qt_linguist.cmake b/cmake/x_qt_linguist.cmake index 959956a6..2c0bbaa1 100644 --- a/cmake/x_qt_linguist.cmake +++ b/cmake/x_qt_linguist.cmake @@ -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}) - set(out_dir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations/${module_name}") - set_source_files_properties(${ts_files} PROPERTIES OUTPUT_LOCATION ${out_dir}) + 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")