[cmake] [libunwind] LLVM_FOUND isn't always set, so just test if
llvm_setup_rpath() is available instead.
llvm-svn: 323601
GitOrigin-RevId: 73e88d394b5e98c5dcc4127f52e0af5bbaa196fe
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 601c258..c8c91f2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -108,7 +108,7 @@
# Build the shared library.
if (LIBUNWIND_ENABLE_SHARED)
add_library(unwind_shared SHARED $<TARGET_OBJECTS:unwind_objects>)
- if(LLVM_FOUND)
+ if(COMMAND llvm_setup_rpath)
llvm_setup_rpath(unwind_shared)
endif()
target_link_libraries(unwind_shared ${libraries})