From 78bc2152dc959d02e8b0ce2d1349b58f24956d69 Mon Sep 17 00:00:00 2001 From: Nobuhiro Ban Date: Fri, 14 Feb 2025 19:55:29 +0900 Subject: [PATCH] build: fix RPATH settings to work even if libdir is not "lib" --- examples/cli/CMakeLists.txt | 4 ++-- memory/src/CMakeLists.txt | 4 ++-- shirakami/src/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/cli/CMakeLists.txt b/examples/cli/CMakeLists.txt index b8927bc..82386a3 100644 --- a/examples/cli/CMakeLists.txt +++ b/examples/cli/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2018-2023 Project Tsurugi. +# Copyright 2018-2025 Project Tsurugi. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ add_executable(cli set_target_properties(cli PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" RUNTIME_OUTPUT_NAME "sharksfin-cli" ) diff --git a/memory/src/CMakeLists.txt b/memory/src/CMakeLists.txt index 31097d0..f5108da 100644 --- a/memory/src/CMakeLists.txt +++ b/memory/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2018-2023 Project Tsurugi. +# Copyright 2018-2025 Project Tsurugi. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ add_library(memory set_target_properties(memory PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN" LIBRARY_OUTPUT_NAME "sharksfin-memory" ) diff --git a/shirakami/src/CMakeLists.txt b/shirakami/src/CMakeLists.txt index eed29bc..8ef9a9d 100644 --- a/shirakami/src/CMakeLists.txt +++ b/shirakami/src/CMakeLists.txt @@ -12,7 +12,7 @@ add_library(shirakami set_target_properties(shirakami PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN" LIBRARY_OUTPUT_NAME "sharksfin-shirakami" )