diff --git a/recipes-qt/qt6/qttools_git.bb b/recipes-qt/qt6/qttools_git.bb index d31ad1b..c6df934 100644 --- a/recipes-qt/qt6/qttools_git.bb +++ b/recipes-qt/qt6/qttools_git.bb @@ -25,10 +25,13 @@ SRC_URI += " \ DEPENDS += "qtbase qtdeclarative qttools-native" -QTTOOLS_USE_CLANG ?= "${@ 'clang' if bb.utils.vercmp_string_op(d.getVar('LLVMVERSION') or '', '17', '>') else ''}" +CAN_USE_CLANG = "${@True if bb.utils.vercmp_string_op(d.getVar('LLVMVERSION') or '', '17', '>') or \ + os.path.exists(os.path.join(d.getVar('COREBASE'),'meta/recipes-devtools/clang')) else False}" +CAN_USE_CLANG:mingw32 = "False" + +QTTOOLS_USE_CLANG ?= "${@ 'clang' if bb.utils.to_boolean(d.getVar('CAN_USE_CLANG')) else ''}" PACKAGECONFIG:class-native = "${QTTOOLS_USE_CLANG}" PACKAGECONFIG:class-nativesdk = "${QTTOOLS_USE_CLANG}" -PACKAGECONFIG:remove:mingw32 = "${QTTOOLS_USE_CLANG}" PACKAGECONFIG[clang] = "-DFEATURE_clang=ON,-DFEATURE_clang=OFF,clang"