From 7db20f5ad5e078f4c37994a71d43684409c95717 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 14 Mar 2018 18:33:15 +0100 Subject: [PATCH] List all required LLVM/Clang libraries explicitely Those libraries are direct dependencies and must be listed explicitely when linking dynamically because transitive dependencies of clangTooling are not pulled automatically by CMake in this case. This is required to use LLVM 6 which has switched to dynamic libraries (at least under Arch Linux). --- generator/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index 21f9e07..d90ae89 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -48,7 +48,7 @@ use_cpp_utilities() # find Clang for LibTooling; adding clangTooling should be sufficient as it pulls all transitive dependencies find_package(Clang REQUIRED) -list(APPEND PRIVATE_LIBRARIES clangTooling) +list(APPEND PRIVATE_LIBRARIES clangTooling clangFrontend clangAST clangLex clangSema clangBasic LLVM) # also add reflective_rapidjson which is header-only but might pull additional include dirs for RapidJSON list(APPEND PRIVATE_LIBRARIES reflective_rapidjson)