Skip to content

Commit c39edc0

Browse files
committed
Add build option to set rpath on Linux
1 parent 57b7386 commit c39edc0

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build/*
2+
build-install/*
23
dist/*
34
src/flint/**/*.c
45
src/flint/*.html

meson.build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ gmp_dep = dependency('gmp')
99
mpfr_dep = dependency('mpfr')
1010
flint_dep = dependency('flint')
1111

12+
# Add rpaths for a local build of flint found via pkgconfig
13+
# https://github.com/mesonbuild/meson/issues/13046
14+
if get_option('add_flint_rpath')
15+
flint_lib_dir = flint_dep.get_pkgconfig_variable('libdir')
16+
add_project_link_arguments(
17+
'-Wl,-rpath=' + flint_lib_dir,
18+
language: 'c',
19+
)
20+
endif
21+
1222
# flint.pc was missing -lflint until Flint 3.1.0
1323
if flint_dep.version().version_compare('<3.1')
1424
flint_dep = cc.find_library('flint')

meson.options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
option('add_flint_rpath', type : 'boolean', value : false)

requirements-dev.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cython
2+
spin
3+
meson
4+
meson-python
5+
pytest
6+
coverage
7+
pytest-cov

0 commit comments

Comments
 (0)