From 91dc954d4006225b67f83e803aedde066bf76806 Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Fri, 2 Jun 2023 07:55:11 -0700 Subject: [PATCH] CMake: add elfutils to rpath for dynamic builds --- CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecd18c57..5080a5f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,8 +214,18 @@ set(DRGN_PATH "${PROJECT_SOURCE_DIR}/extern/drgn/build") # to be set before add_executable() unfortunately. Maybe split libdrgn stuff # into a separate file later. set(CMAKE_SKIP_BUILD_RPATH FALSE) -set(CMAKE_INSTALL_RPATH "${DRGN_PATH}/.libs") -set(CMAKE_BUILD_RPATH "${DRGN_PATH}/.libs") +set(CMAKE_INSTALL_RPATH + "${DRGN_PATH}/.libs" + "${DRGN_PATH}/velfutils/libdw" + "${DRGN_PATH}/velfutils/libelf" + "${DRGN_PATH}/velfutils/libdwelf" +) +set(CMAKE_BUILD_RPATH + "${DRGN_PATH}/.libs" + "${DRGN_PATH}/velfutils/libdw" + "${DRGN_PATH}/velfutils/libelf" + "${DRGN_PATH}/velfutils/libdwelf" +) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) include_directories(SYSTEM "${DRGN_PATH}")