Skip to content

Commit

Permalink
Add build option to set rpath on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarbenjamin committed Jun 13, 2024
1 parent 57b7386 commit c39edc0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/*
build-install/*
dist/*
src/flint/**/*.c
src/flint/*.html
Expand Down
10 changes: 10 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ gmp_dep = dependency('gmp')
mpfr_dep = dependency('mpfr')
flint_dep = dependency('flint')

# Add rpaths for a local build of flint found via pkgconfig
# https://github.com/mesonbuild/meson/issues/13046
if get_option('add_flint_rpath')
flint_lib_dir = flint_dep.get_pkgconfig_variable('libdir')
add_project_link_arguments(
'-Wl,-rpath=' + flint_lib_dir,
language: 'c',
)
endif

# flint.pc was missing -lflint until Flint 3.1.0
if flint_dep.version().version_compare('<3.1')
flint_dep = cc.find_library('flint')
Expand Down
1 change: 1 addition & 0 deletions meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
option('add_flint_rpath', type : 'boolean', value : false)
7 changes: 7 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cython
spin
meson
meson-python
pytest
coverage
pytest-cov

0 comments on commit c39edc0

Please sign in to comment.