Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: revert static hipo link #132

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions examples/build_with_meson/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ project(

# find dependencies
# - it's good practice to specifiy minimum version requirements; here we just assume that `iguana` already did this
hipo_dep = dependency('hipo4', static: true) # use static link, for performance
hipo_dep = dependency('hipo4')
iguana_dep = dependency('iguana')

# set rpath
# - this is so that the executable knows where the dependency libraries are
# - alternatively, set $LD_LIBRARY_PATH before running your executables ($DYLD_LIBRARY_PATH on macOS)
# - not needed for libraries which are static-linked
bin_rpaths = [
iguana_dep.get_variable(pkgconfig: 'libdir')
hipo_dep.get_variable(pkgconfig: 'libdir')
]
if host_machine.system() != 'darwin'
bin_rpaths += iguana_dep.get_variable(pkgconfig: 'libdir') # not needed on macOS
endif

# build and install the executable
example_bin = 'iguana-example-00-basic'
Expand Down
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ yamlcpp_dep = dependency(
)
hipo_dep = dependency(
'hipo4',
static: true,
method: 'pkg-config',
version: '>=4.0.1',
)
Expand Down Expand Up @@ -148,7 +147,9 @@ project_test_env.set(
)

# executables' rpath
project_exe_rpath = []
project_exe_rpath = [
hipo_dep.get_variable(pkgconfig: 'libdir')
]
if host_machine.system() != 'darwin'
# FIXME(darwin): not sure how to set multiple rpaths on darwin executables,
# aside from running `install_name_tool -add_rpath` post-installation;
Expand Down
Loading