ClangFormat: explicitly link with LLVM

The ClangFormat plugin uses the LLVM API explicitly, so explicitly link
with the LLVM library when available, using its cmake target. This way
the linking is done no matter whether the target for the clang format
library declares LLVM as its public dependency.

Change-Id: I997c720935750fd01229d4d4c20c1bdcadca9ac7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Pino Toscano
2024-07-21 13:59:07 +02:00
parent d410155395
commit eee3fc6907

View File

@@ -37,3 +37,8 @@ extend_qtc_plugin(ClangFormat
DEFINES
TESTDATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/tests/data"
)
extend_qtc_plugin(ClangFormat
CONDITION TARGET LLVM
DEPENDS LLVM
)