diff --git a/lldb/cmake/modules/LLDBFramework.cmake b/lldb/cmake/modules/LLDBFramework.cmake --- a/lldb/cmake/modules/LLDBFramework.cmake +++ b/lldb/cmake/modules/LLDBFramework.cmake @@ -120,3 +120,8 @@ COMMENT "LLDB.framework: copy clang vendor-specific headers" ) endif() + +# Add an rpath pointing to the directory where LLDB.framework is installed. +# This allows frameworks (relying on @rpath) to be installed in the same folder and found at runtime. +set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH + "@loader_path/../../../")