diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt
index 577daaa..6a219d6 100644
--- a/lang/CMakeLists.txt
+++ b/lang/CMakeLists.txt
@@ -8,24 +8,17 @@ if(Qt5LinguistTools_FOUND)
set(LIBSNORE_LANGS de en)
set(TS_FILES )
- set( snore_i18n_content "\n\n" )
+ set( snore_i18n_content "" )
foreach( lang ${LIBSNORE_LANGS} )
list(APPEND TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${lang}.ts)
- set( snore_i18n_content "${snore_i18n_content}${lang}.qm\n" )
+ set( snore_i18n_content "${snore_i18n_content}\n\t\t${lang}.qm" )
endforeach()
- set( snore_i18n_content "${snore_i18n_content}\n\n" )
- file( WRITE ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc.in "${snore_i18n_content}" )
-
QT5_CREATE_TRANSLATION(libsnore_lang ${TS_FILES} ${PROJECT_SOURCE_DIR}/src)
- add_custom_command(OUTPUT snore_i18n.qrc
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc.in ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc
- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
-
- add_custom_target(libsnore_lang_translation ALL DEPENDS ${libsnore_lang} DEPENDS snore_i18n.qrc)
+ configure_file(snore_i18n.qrc.in snore_i18n.qrc @ONLY)
+ add_custom_target(libsnore_lang_translation ALL DEPENDS ${libsnore_lang})
set(SNORE_RCS ${SNORE_RCS} ${CMAKE_BINARY_DIR}/lang/snore_i18n.qrc PARENT_SCOPE)
diff --git a/lang/snore_i18n.qrc.in b/lang/snore_i18n.qrc.in
new file mode 100644
index 0000000..648c4c2
--- /dev/null
+++ b/lang/snore_i18n.qrc.in
@@ -0,0 +1,5 @@
+
+
+ @snore_i18n_content@
+
+