From 70c7a02790d07b71bb439072ec775d814315c515 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Fri, 31 Jul 2026 08:30:19 -0700 Subject: [PATCH] apply rpath logic for OSX identical logic was used in mkl-service --- meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 6e07cb01..032703ec 100644 --- a/meson.build +++ b/meson.build @@ -29,8 +29,13 @@ cc = meson.get_compiler('c') c_args = ['-DNDEBUG'] rpath_link_args = [] -if host_machine.system() == 'linux' - rpath = '$ORIGIN' / '../..' + ':' + '$ORIGIN' / '../../..' +if host_machine.system() != 'windows' + if host_machine.system() == 'darwin' + origin = '@loader_path' + else + origin = '$ORIGIN' + endif + rpath = origin / '../..' + ':' + origin / '../../..' rpath_link_args = ['-Wl,-rpath,' + rpath] endif