Qt: Only include qtbase translations if present

This commit is contained in:
Vicki Pfau 2019-03-25 00:20:21 -07:00
parent 0f7327ea44
commit 782742a731
1 changed files with 4 additions and 1 deletions

View File

@ -268,7 +268,10 @@ if(Qt5LinguistTools_FOUND)
foreach(TS ${TS_FILES})
get_filename_component(TS ${TS} NAME)
string(REGEX REPLACE "${BINARY_NAME}-(.*).ts$" "qtbase_\\1.qm" QT_QM "${TS}")
list(APPEND QT_QM_FILES "${QT_QM_LOCATION}/${QT_QM}")
set(QT_QM "${QT_QM_LOCATION}/${QT_QM}")
if(EXISTS "${QT_QM}")
list(APPEND QT_QM_FILES "${QT_QM}")
endif()
endforeach()
list(APPEND TRANSLATION_FILES ${QT_QM_FILES})
endif()