diff options
author | Sergio Martins <smartins@kde.org> | 2019-11-11 20:09:56 +0000 |
---|---|---|
committer | Sergio Martins <smartins@kde.org> | 2019-11-11 20:09:56 +0000 |
commit | f56f90490724d21be4a39abb726daa085f765d74 (patch) | |
tree | 799d834031744008f84bc5c9b191222703c3728a | |
parent | 848e8148e35e0ed50abe7a38a56b478ef478f6fd (diff) |
temporary branch to test patch by krop in the docker containersupstream/testing_buildfix
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rw-r--r-- | cmake/FindClang.cmake | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b7301edb..ce1f8875 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,9 +125,14 @@ macro(link_to_llvm name is_standalone) if(WIN32) target_link_libraries(${name} version.lib) endif() - target_link_libraries(${name} clangTooling) - target_link_libraries(${name} clangToolingCore) - target_link_libraries(${name} ${clang_tooling_refactoring_lib}) + # clang >= 9.0 can provide a single shared library instead of split ones + if(CLANG_CLANG-CPP_LIB) + target_link_libraries(${name} clang-cpp) + else() + target_link_libraries(${name} clangTooling) + target_link_libraries(${name} clangToolingCore) + target_link_libraries(${name} ${clang_tooling_refactoring_lib}) + endif() endmacro() macro(add_clang_plugin name) diff --git a/cmake/FindClang.cmake b/cmake/FindClang.cmake index 542172e0..50e0829f 100644 --- a/cmake/FindClang.cmake +++ b/cmake/FindClang.cmake @@ -62,6 +62,7 @@ if (LLVM_FOUND AND LLVM_LIBRARY_DIRS) # note: On Windows there's 'libclang.dll' instead of 'clang.dll' -> search for 'libclang', too find_library(CLANG_LIBCLANG_LIB NAMES clang libclang HINTS ${LLVM_LIBRARY_DIRS}) # LibClang: high-level C interface + FIND_AND_ADD_CLANG_LIB(clang-cpp) FIND_AND_ADD_CLANG_LIB(clangFrontend) FIND_AND_ADD_CLANG_LIB(clangDriver) FIND_AND_ADD_CLANG_LIB(clangCodeGen) |