From 9cc0b94a27c76ad4984cf05707ed56932520f1f7 Mon Sep 17 00:00:00 2001 From: Joker2770 <1214220480@qq.com> Date: Thu, 23 Nov 2023 14:09:24 +0800 Subject: [PATCH] chore: add rpath for loading onnxruntime libraries. :rockets: --- xmake.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmake.lua b/xmake.lua index f6503f8..9d7e207 100644 --- a/xmake.lua +++ b/xmake.lua @@ -8,12 +8,14 @@ target("Z2I") set_kind("static") add_files("src/*.cpp") add_packages("onnxruntime") + add_rpathdirs("@loader_path", "@loader_path/lib", "@executable_path", "@executable_path/lib") target("pbrain-Z2I") set_kind("binary") add_files("src/pbrain-Z2I/*.cpp") add_deps("Z2I") add_packages("onnxruntime") + add_rpathdirs("@loader_path", "@loader_path/lib", "@executable_path", "@executable_path/lib") after_build(function (target) os.cp("$(scriptdir)/config/*.toml", target:targetdir()) end) @@ -23,3 +25,4 @@ target("train_and_eval") add_files("src/train_and_eval/*.cpp") add_deps("Z2I") add_packages("onnxruntime") + add_rpathdirs("@loader_path", "@loader_path/lib", "@executable_path", "@executable_path/lib")