From 6d3eb83be1bb53a072a13aa2985aa8fb84601727 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 7 Nov 2023 21:38:01 +0200 Subject: [PATCH] Update CMakeLists.txt --- lib/Interpreter/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Interpreter/CMakeLists.txt b/lib/Interpreter/CMakeLists.txt index cd5ddd9c5..09a5c3476 100644 --- a/lib/Interpreter/CMakeLists.txt +++ b/lib/Interpreter/CMakeLists.txt @@ -41,6 +41,18 @@ add_llvm_library(clangCppInterOp dl ) + +# Get rid of libLLVM-X.so which is appended to the list of static libraries. +if (LLVM_LINK_LLVM_DYLIB) + get_target_property(deps clangCppInterOp LINK_LIBRARIES) + message (STATUS "L:${deps}") + list(REMOVE_ITEM deps "LLVM") + message (STATUS "K:${deps}") + set_target_properties(clangCppInterOp PROPERTIES LINK_LIBRARIES ${deps}) + get_target_property(iface_deps clangCppInterOp INTERFACE_LINK_LIBRARIES) + message (STATUS "I:${iface_deps}") +endif(LLVM_LINK_LLVM_DYLIB) + string(REPLACE ";" "\;" _VER CPPINTEROP_VERSION) set_source_files_properties(CppInterOp.cpp PROPERTIES COMPILE_DEFINITIONS "LLVM_BINARY_DIR=\"${LLVM_BINARY_DIR}\";CPPINTEROP_VERSION=\"${_VAR}\""