From 05d455debc6ce82f838f997ba0ba1181c269f258 Mon Sep 17 00:00:00 2001 From: James Turner <zakalawe@mac.com> Date: Tue, 12 May 2020 13:36:28 +0100 Subject: [PATCH] Fix build issue when a translation file is missing Only try to build XLF files we actually found in the source dir. --- CMakeModules/Translations.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeModules/Translations.cmake b/CMakeModules/Translations.cmake index 0788b1bd7..50fa6bcc3 100644 --- a/CMakeModules/Translations.cmake +++ b/CMakeModules/Translations.cmake @@ -31,6 +31,12 @@ if (${do_translate}) # qm generation and installation foreach(LANG ${LANGUAGES}) + # avoid issue if the FGData we found is a different version, and a translation is + # missing: just skip it + if (NOT EXISTS ${TRANSLATIONS_SRC_DIR}/${LANG}/FlightGear-Qt.xlf) + continue() + endif() + set(out_file "${PROJECT_BINARY_DIR}/FlightGear_${LANG}.qm") add_custom_command( OUTPUT ${out_file}