-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmeson.build
More file actions
71 lines (61 loc) · 2.42 KB
/
meson.build
File metadata and controls
71 lines (61 loc) · 2.42 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 2020-2024 Board of Regents of the University of Wisconsin System
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License, version 2.1, as published
# by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Author: Mark A. Tsuchida
project(
'pymmcore',
'cpp',
version: '12.4.0.75.0.dev0',
meson_version: '>=1.8.0',
default_options: [
'cpp_std=c++17',
'warning_level=3',
],
)
cxx = meson.get_compiler('cpp')
if cxx.get_id() in ['gcc', 'clang']
# Disable warnings triggered by SWIG-generated code:
add_project_arguments('-Wno-unused-parameter', language: 'cpp')
add_project_arguments('-Wno-unused-variable', language: 'cpp')
endif
if cxx.get_id() in ['msvc', 'clang-cl']
add_project_arguments('-DNOMINMAX', language: 'cpp')
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'cpp')
# Disable warnings triggered by SWIG-generated code:
add_project_arguments('/wd4100', language: 'cpp')
add_project_arguments('/wd4101', language: 'cpp')
add_project_arguments('/wd4127', language: 'cpp')
add_project_arguments('/wd4456', language: 'cpp')
add_project_arguments('/wd4706', language: 'cpp')
endif
fs = import('fs')
python = import('python').find_installation(pure: false)
threads_dep = dependency('threads')
numpy_dep = dependency('numpy')
swig = find_program('swig', native: true)
# For now, use MMCore as a subproject. This may be changed to using as a
# proper dependency via a wrap, but that will likely require better SWIG
# support by Meson in order to get the SWIG include directories from the
# dependency object.
mmcore_proj = subproject(
'mmcore',
default_options: {
'default_library': 'static',
'tests': 'disabled', # Avoid Catch2 subproject in sdist
},
)
mmcore_dep = mmcore_proj.get_variable('mmcore_dep')
swig_include_dirs = mmcore_proj.get_variable('swig_include_dirs')
subdir('src/pymmcore')