cmake: moved qt5_add_translation to parent scope

Scope issues seem to cause problems where the main compile step can't find the translation step, so even though it's messier, this code is now in the parent scope.

Fixes #1595
This commit is contained in:
itsmattkc
2021-04-28 12:57:33 +10:00
parent a7d7515ba7
commit a7257c75b9
2 changed files with 15 additions and 16 deletions
-16
View File
@@ -33,19 +33,3 @@ set(OLIVE_TS_FILES
ts/zh_TW.ts
PARENT_SCOPE
)
# Add translations
qt5_add_translation(OLIVE_QM_FILES ${OLIVE_TS_FILES})
set(QRC_BODY "")
foreach(QM_FILE ${OLIVE_QM_FILES})
get_filename_component(QM_FILENAME_COMPONENT ${QM_FILE} NAME_WE)
string(APPEND QRC_BODY "<file alias=\"${QM_FILENAME_COMPONENT}\">${QM_FILE}</file>\n")
endforeach()
configure_file(translations.qrc.in translations.qrc @ONLY)
set(OLIVE_RESOURCES
${OLIVE_RESOURCES}
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc
PARENT_SCOPE
)