-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
75 lines (55 loc) · 2.34 KB
/
meson.build
File metadata and controls
75 lines (55 loc) · 2.34 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
72
73
74
# SPDX-FileCopyrightText: 2022 - 2023 Peter Urban, Ghent University
#
# SPDX-License-Identifier: CC0-1.0
# --- Project ---
# Define project meta data
project(
'themachinethatgoesping_algorithms',
'cpp',
license: 'MPL-2.0',
version: '0.11.1',
default_options: ['warning_level=0', 'buildtype=release', 'cpp_std=c++23'],
meson_version: '>=1.8.1' #there is a problem with meson 1.8.0 so just use a higher version
)
projectnamespace = 'themachinethatgoesping'
# --- dependencies ---
# boost
boost_dep = dependency('boost', static: get_option('dynamic_boost').disabled())
# ext libraries
gswteos_10_dep = dependency('gswteos_10', required: true, default_options : ['warning_level=0'])
# themachinethatgoesping
# tools
tools_dep = dependency('themachinethatgoesping_tools', required: false)
navigation_dep = dependency('themachinethatgoesping_navigation', required: false)
if not tools_dep.found()
tools_dep = subproject('tools', default_options: ['cpp_std=' + get_option('cpp_std')]).get_variable('tools_dep')
endif
if not navigation_dep.found()
navigation_dep = subproject('navigation', default_options: ['cpp_std=' + get_option('cpp_std')]).get_variable('navigation_dep')
endif
# -- python modules --
if get_option('build_pythonmodule').enabled()
pymod = import('python').find_installation(get_option('python_path'), pure: false)
python3_dep = pymod.dependency()
pybind11_dep = dependency('pybind11', version : '>=3.0.1')
nanobind_dep = dependency('nanobind', version : '>=2.9.1')
tools_pybind_dep = dependency('themachinethatgoesping_tools_pybind', required: false)
tools_nanobind_dep = dependency('themachinethatgoesping_tools_nanobind', required: false)
if not tools_pybind_dep.found()
tools_pybind_dep = subproject('tools').get_variable('tools_pybind_dep')
endif
if not tools_nanobind_dep.found()
tools_nanobind_dep = subproject('tools').get_variable('tools_nanobind_dep')
endif
# set path where to install sources (pythonpath/site-packages/projectnamespace)
message('python module install directory:', pymod.get_install_dir(subdir: projectnamespace))
endif
#themachinethatgoesping meta info
meta_dep = dependency('themachinethatgoesping_meta', required: false)
if not meta_dep.found()
meta_dep = subproject('meta').get_variable('meta_dep')
endif
# add src
subdir('src')
# add python files
subdir('python')