forked from silx-kit/pyFAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
41 lines (33 loc) · 1.02 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
project('pyFAI',
'c', 'cython',
license: 'MIT',
meson_version: '>= 0.60',
version: run_command(['version.py', '--wheel'],
check:true).stdout().strip(),
default_options: ['buildtype=plain', ],
)
# Seek the backend
if meson.backend() != 'ninja'
error('Ninja backend required')
endif
# Seek for Cython installation
cython = find_program('cython', required : true)
if not cython.found()
error('Cython not found.')
endif
cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required : false)
if m_dep.found()
add_project_link_arguments('-lm', language : 'c')
endif
# https://mesonbuild.com/Python-module.html
py_mod = import('python')
py = py_mod.find_installation()
py_dep = py.dependency()
# MinGW-W64 #
#if host_machine.system() == 'windows' and meson.get_compiler('c').get_id() == 'gcc'
# add_project_link_arguments('-lucrt', '-static', language: 'c')
# add_project_arguments('-mlong-double-64', language: 'c')
# add_project_arguments('-DMS_WIN64', language: 'c')
#endif
subdir('pyFAI')