Qt: Only include qtbase translations if present
Vicki Pfau vi@endrift.com
Mon, 25 Mar 2019 00:20:21 -0700
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
src/platform/qt/CMakeLists.txt
→
src/platform/qt/CMakeLists.txt
@@ -268,7 +268,10 @@ get_filename_component(QT_QM_LOCATION "${QT_CORE_LOCATION}/../translations" ABSOLUTE)
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()