new meson file

This commit is contained in:
Jerome Kieffer 2022-12-26 12:08:53 +01:00
parent cf3454b853
commit 994e537831
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
project('pyFAI',
'c', 'cython',
license: 'MIT',
meson_version: '>= 0.60',
version: run_command('version.py',
check:true).stdout().strip(),
)
# 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()
subdir('pyFAI')