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:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user