diff options
author | Rui Chen <rui@chenrui.dev> | 2024-04-01 18:46:12 -0400 |
---|---|---|
committer | Antoine SOULIER <103120622+asoulier@users.noreply.github.com> | 2024-04-05 09:21:59 -0700 |
commit | 5e528fc54368ce826a3bb5751499061cfa1bda71 (patch) | |
tree | fae4a3c9472df60f9c48a76e484bc84667620836 | |
parent | e54cdeb9f091e74dee680e342ab7f7c6e4a77281 (diff) | |
download | liblc3-5e528fc54368ce826a3bb5751499061cfa1bda71.tar.gz |
build: fix rpath issue
While packaging for homebrew, I ran into some rpath issue when building the tools.
```
$ /opt/homebrew/Cellar/liblc3/1.1.0/bin/elc3 -h
dyld[72986]: Library not loaded: @rpath/liblc3.1.dylib
Referenced from: <1B4E9174-0A9C-3907-8487-40BBBE5B52CB> /opt/homebrew/Cellar/liblc3/1.1.0/bin/elc3
Reason: no LC_RPATH's found
Abort trap: 6
```
This patch is for fixing the rpath ref issue.
Signed-off-by: Rui Chen <rui@chenrui.dev>
-rw-r--r-- | tools/meson.build | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/meson.build b/tools/meson.build index 8d0cf49..5da77e7 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -24,9 +24,11 @@ lc3toolslib = static_library('lc3toolslib', executable('elc3', ['elc3.c'], link_with : lc3toolslib, include_directories: inc, - install: true) + install: true, + install_rpath: join_paths(get_option('prefix'), get_option('libdir'))) executable('dlc3', ['dlc3.c'], link_with : lc3toolslib, include_directories: inc, - install: true) + install: true, + install_rpath: join_paths(get_option('prefix'), get_option('libdir'))) |