Skip to content

Commit

Permalink
build: revert static hipo link (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks authored Mar 14, 2024
1 parent 6f83232 commit b428204
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

0 comments on commit b428204

Please sign in to comment.