Skip to content

Commit

Permalink
test: add rpath post-install
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Jan 8, 2024
1 parent 77232d6 commit cb14708
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ def meson_string_array(arr):
meson setup --native-file {args.ini} {args.build} {sourceDir}
meson install -C {args.build}
'''))
for rpath in pkg_config_path:
fp.write(textwrap.dedent(f'''\
for exe in iguana-example-00-basic iguana-example-01-bank-rows; do
install_name_tool -add_rpath {rpath}/.. iguana/bin/$exe
done
'''))
os.chmod(installScript, 0o744)
print(f'''
Generated installation script {installScript}
Expand Down
12 changes: 6 additions & 6 deletions examples/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ example_sources = [
]

# add iguana libraries to rpath
example_rpaths = []
example_rpaths += hipo_dep.get_variable(pkgconfig: 'libdir')
if host_machine.system() != 'darwin'
example_rpaths += '$ORIGIN' / '..' / get_option('libdir')
endif
# example_rpaths = []
# example_rpaths += hipo_dep.get_variable(pkgconfig: 'libdir')
# if host_machine.system() != 'darwin'
# example_rpaths += '$ORIGIN' / '..' / get_option('libdir')
# endif

# build executables
foreach src : example_sources
Expand All @@ -19,6 +19,6 @@ foreach src : example_sources
dependencies: project_deps,
link_with: project_libs,
install: true,
install_rpath: ':'.join(example_rpaths),
# install_rpath: ':'.join(example_rpaths),
)
endforeach

0 comments on commit cb14708

Please sign in to comment.