forked from flintlib/python-flint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
43 lines (34 loc) · 1.07 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
project('python-flint', 'cython', 'c')
py = import('python').find_installation(pure: false)
dep_py = py.dependency()
cc = meson.get_compiler('c')
gmp_dep = dependency('gmp')
mpfr_dep = dependency('mpfr')
flint_dep = dependency('flint')
add_project_arguments(
'-X', 'embedsignature=True',
'-X', 'emit_code_comments=True',
language : 'cython'
)
if get_option('coverage')
add_project_arguments('-X', 'linetrace=True', language : 'cython')
add_project_arguments('-DCYTHON_TRACE=1', language : 'c')
endif
# 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')
have_acb_theta = false
else
have_acb_theta = true
endif
pyflint_deps = [dep_py, gmp_dep, mpfr_dep, flint_dep]
subdir('src/flint')