From ba9783356ba9a3c04a78bc1ce36a1c42a1106f84 Mon Sep 17 00:00:00 2001 From: MinGyuJung1996 <65647428+MinGyuJung1996@users.noreply.github.com> Date: Wed, 8 Jan 2025 17:09:12 +0900 Subject: [PATCH] fix: INSTALL_RPATH for linux using lib64 (#975) I found that the RPATH is not properly set for linux distributions that use lib64 as the default library directory(e.g., RedHat or CentOS). I changed the RPATH to follow the directory which libktx is actually installed by using the value of CMAKE_INSTALL_LIBDIR. --- tools/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 934c928993..8ab4c5a534 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -55,7 +55,7 @@ function(set_tool_properties tool_target) # Check DT_RUNPATH with one of # - readelf -d | head -20 # - objdump -x | grep 'R.*PATH' - INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN;\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" ) endif() endfunction()