From 3869487a473b75d0b7c371e892844963fa1070fb Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Thu, 27 Jan 2022 14:13:48 +1000 Subject: [PATCH] Allow to build ClangFormat plugin with CLANGTOOLING_LINK_CLANG_DYLIB Some Linux distributives provides moders clang without separate libs compiled, like libClangTooling and so on. Just provide libclang.so and libclang-cpp.so. Qt Creator provides way to handle such clang installation by pointing flag CLANGTOOLING_LINK_CLANG_DYLIB=On for CMake. But ClangFormat still keeps from building. Fixed it. Change-Id: Id420f82c47c4205c8cd631aa04be6771628984be Reviewed-by: Eike Ziller --- src/plugins/clangformat/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/clangformat/CMakeLists.txt b/src/plugins/clangformat/CMakeLists.txt index 5cc3f6c85ea..dbeaed94888 100644 --- a/src/plugins/clangformat/CMakeLists.txt +++ b/src/plugins/clangformat/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(ClangFormat - CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND QTC_CLANG_BUILDMODE_MATCH + CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND (QTC_CLANG_BUILDMODE_MATCH OR CLANGTOOLING_LINK_CLANG_DYLIB) DEPENDS Utils Qt5::Widgets ${CLANG_FORMAT_LIB} INCLUDES "${CLANG_INCLUDE_DIRS}" PLUGIN_DEPENDS Core TextEditor CppEditor ProjectExplorer