Reland:
[cmake] [libcxxabi] Call llvm_setup_rpath() when adding shared libraries.
Clang and llvm already use llvm_setup_rpath(), so this change will
help standarize rpath usage across all projects.
Differential Revision: https://reviews.llvm.org/D42460
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@323495 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 240f6d0..a5905ce 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -127,6 +127,9 @@
# Build the shared library.
if (LIBCXXABI_ENABLE_SHARED)
add_library(cxxabi_shared SHARED $<TARGET_OBJECTS:cxxabi_objects>)
+ if(LLVM_FOUND)
+ llvm_setup_rpath(cxxabi_shared)
+ endif()
target_link_libraries(cxxabi_shared ${LIBCXXABI_LIBRARIES})
set_target_properties(cxxabi_shared
PROPERTIES