forked from python-microscopy/python-microscopy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
50 lines (43 loc) · 1.39 KB
/
meson.build
File metadata and controls
50 lines (43 loc) · 1.39 KB
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
44
45
46
47
48
49
50
project(
'python-microscopy',
'c', 'cython',
version: run_command(
# This should become `numpy/_version.py` in NumPy 2.0
['python', './PYME/version.py'],
check: true).stdout().strip(),
license: 'GNU General Public License v3.0',
meson_version: '>=1.2.99', # version in vendored-meson is 1.2.99
# default_options: [
# 'buildtype=debugoptimized',
# 'b_ndebug=if-release',
# 'c_std=c11',
# 'cpp_std=c++17',
# 'pkgconfig.relocatable=true',
# ],
)
py = import('python').find_installation(pure: false)
np_include_dir = include_directories(run_command(py, ['-c', 'import numpy; print(numpy.get_include())'], check: true).stdout().strip())
#message('numpy include dir:', np_include_dir)
message('install_dir:', py.get_install_dir())
# we define cc here and can then use it in lower level meson.build files
# traversed via the subdir command
cc = meson.get_compiler('c')
# for examples how to test for compiler specific flags
# see also https://github.com/GNOME/gtk/blob/main/meson.build
# especially use of "cc.get_supported_arguments(test_cflags)"
if cc.get_id() != 'msvc'
add_global_arguments(
#'-fcompare-debug-secondary',
#'-wno'
'-ffast-math',
'-Wno-unused-parameter',
'-Wno-unused-variable',
'-Wno-unused-function',
language: 'c'
)
add_global_link_arguments(
'-lm',
language: 'c'
)
endif
subdir('PYME')