From 6964fe260376e6a8cb6c29c856981109a4c392fb Mon Sep 17 00:00:00 2001 From: Nobuhiro Ban Date: Fri, 14 Feb 2025 20:14:38 +0900 Subject: [PATCH] build: fix RPATH settings to work even if libdir is not "lib" --- bridge/src/CMakeLists.txt | 4 ++-- examples/cli/CMakeLists.txt | 4 ++-- examples/tpcc/CMakeLists.txt | 4 ++-- examples/tpcc_loader/CMakeLists.txt | 4 ++-- mock/src/CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bridge/src/CMakeLists.txt b/bridge/src/CMakeLists.txt index eafd6b7..219715f 100644 --- a/bridge/src/CMakeLists.txt +++ b/bridge/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2019-2019 tsurugi project. +# Copyright 2019-2025 tsurugi project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ add_library(bridge set_target_properties(bridge PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN" OUTPUT_NAME "ogawayama-bridge-${SHARKSFIN_IMPLEMENTATION}" ) diff --git a/examples/cli/CMakeLists.txt b/examples/cli/CMakeLists.txt index d450df7..5467f22 100644 --- a/examples/cli/CMakeLists.txt +++ b/examples/cli/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2019-2019 tsurugi project. +# Copyright 2019-2025 tsurugi project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ add_executable(cli set_target_properties(cli PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" RUNTIME_OUTPUT_NAME "ogawayama-cli" ) diff --git a/examples/tpcc/CMakeLists.txt b/examples/tpcc/CMakeLists.txt index 5aadd6a..29285b3 100644 --- a/examples/tpcc/CMakeLists.txt +++ b/examples/tpcc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2019-2020 tsurugi project. +# Copyright 2019-2025 tsurugi project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ add_executable(tpcc set_target_properties(tpcc PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" RUNTIME_OUTPUT_NAME "ogawayama-tpcc" ) diff --git a/examples/tpcc_loader/CMakeLists.txt b/examples/tpcc_loader/CMakeLists.txt index 6f93a60..d65ec25 100644 --- a/examples/tpcc_loader/CMakeLists.txt +++ b/examples/tpcc_loader/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2019-2019 tsurugi project. +# Copyright 2019-2025 tsurugi project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ add_executable(tpcc-loader set_target_properties(tpcc-loader PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" RUNTIME_OUTPUT_NAME "ogawayama-tpcc-loader" ) diff --git a/mock/src/CMakeLists.txt b/mock/src/CMakeLists.txt index 1e44531..5d28912 100644 --- a/mock/src/CMakeLists.txt +++ b/mock/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2019-2019 tsurugi fin project. +# Copyright 2019-2025 tsurugi fin project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ target_include_directories(stub-mock set_target_properties(stub-mock PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN" LIBRARY_OUTPUT_NAME "ogawayama-stub-mock" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 95e5472..6a216ed 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2019-2023 tsurugi fin project. +# Copyright 2019-2025 tsurugi fin project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -80,7 +80,7 @@ add_dependencies(stub set_target_properties(stub PROPERTIES - INSTALL_RPATH "\$ORIGIN/../lib" + INSTALL_RPATH "\$ORIGIN" LIBRARY_OUTPUT_NAME "ogawayama-stub" )