diff --git a/local/recipes/kde/kf6-extra-cmake-modules/source/modules/ECMPoQmTools.cmake b/local/recipes/kde/kf6-extra-cmake-modules/source/modules/ECMPoQmTools.cmake index f348be754c..e06b8318bc 100644 --- a/local/recipes/kde/kf6-extra-cmake-modules/source/modules/ECMPoQmTools.cmake +++ b/local/recipes/kde/kf6-extra-cmake-modules/source/modules/ECMPoQmTools.cmake @@ -148,11 +148,21 @@ function(ecm_process_po_files_as_qm lang) message(FATAL_ERROR "ecm_process_po_files_as_qm() must be called with PO_FILES argument") endif() - # Find lrelease and lconvert + # Find lrelease and lconvert. LinguistTools (lrelease/lconvert) live in + # qttools, which is not part of the cross toolchain when building for Redox. + # Use OPTIONAL_COMPONENTS so a missing LinguistTools neither aborts here nor + # registers as a required package that the final feature_summary would fail + # on. Without the tools, .po -> .qm translation compilation cannot run, so + # skip it gracefully (the app is built untranslated). if (QT_MAJOR_VERSION EQUAL "5") - find_package(Qt5LinguistTools CONFIG REQUIRED) + find_package(Qt5LinguistTools CONFIG) else() - find_package(Qt6 COMPONENTS LinguistTools CONFIG REQUIRED) + find_package(Qt6 OPTIONAL_COMPONENTS LinguistTools CONFIG) + endif() + + if (NOT TARGET Qt${QT_MAJOR_VERSION}::lconvert AND NOT TARGET Qt${QT_MAJOR_VERSION}::lrelease) + message(STATUS "ECMPoQmTools: LinguistTools unavailable; skipping .po -> .qm processing") + return() endif() if(TARGET Qt${QT_MAJOR_VERSION}::lconvert)