qttools: add PACKAGECONFIG for clang dependency

QDoc depends on libclang and using clang toolchain causes build error:
| CMake Error at qttools/6.6.0-r0/recipe-sysroot/usr/lib/cmake/Qt6/QtToolHelpers.cmake:623 (message):
|   Failed to find the host tool "Qt6::qdoc".  It is part of the Qt6ToolsTools
|   package, but the package did not contain the tool.  Make sure that the host
|   module Tools was built with all features enabled (no explicitly disabled
|   tools).
because libclang was found for qttools-native, but not for the target.

Add PACKAGECONFIG that can be enabled when using clang toolchain
if there is need for the qdoc, but otherwise keep it disabled.

Change-Id: Idc4e35936511ef0c208d7e8fd6f8fc51f3f8a1e2
Reviewed-by: Martin Jansa <Martin.Jansa@gmail.com>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Reviewed-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 4729a37e36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Samuli Piippo 2023-06-07 14:06:42 +00:00 committed by Qt Cherry-pick Bot
parent 8b9d5c95ca
commit ca0dbeedb0

View File

@ -24,6 +24,8 @@ SRC_URI += " \
DEPENDS += "qtbase qtdeclarative qttools-native"
PACKAGECONFIG[clang] = "-DFEATURE_clang=ON,-DFEATURE_clang=OFF,clang"
FILES:${PN}-tools += "${QT6_INSTALL_DATADIR}/phrasebooks"
BBCLASSEXTEND = "native nativesdk"