From eee3fc69070355d50f2223d49a0bcbe5137d11c1 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 21 Jul 2024 13:59:07 +0200 Subject: [PATCH] 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 --- src/plugins/clangformat/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/clangformat/CMakeLists.txt b/src/plugins/clangformat/CMakeLists.txt index 30bc50dd2c3..6873e690a14 100644 --- a/src/plugins/clangformat/CMakeLists.txt +++ b/src/plugins/clangformat/CMakeLists.txt @@ -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 +)