-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
66 lines (49 loc) · 1.93 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
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
# SPDX-FileCopyrightText: 2022 - 2023 Peter Urban, Ghent University
#
# SPDX-License-Identifier: CC0-1.0
# --- Project ---
# Define project meta data
project(
'themachinethatgoesping_pingprocessing',
'cpp',
license: 'MPL-2.0',
version: '0.11.1',
default_options: ['warning_level=2', 'buildtype=release', 'cpp_std=c++20'],
meson_version: '>=1.3.2' #first version with clang-cl openmp support
)
projectnamespace = 'themachinethatgoesping'
# --- dependencies ---
# boost
boost_dep = dependency('boost', static: get_option('dynamic_boost').disabled())
# ext libraries
# themachinethatgoesping
# tools
tools_dep = dependency('themachinethatgoesping_tools', required: false)
echosounders_dep = dependency('themachinethatgoesping_echosounders', 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 echosounders_dep.found()
tools_dep = subproject('echosounders', default_options: ['cpp_std=' + get_option('cpp_std')]).get_variable('echosounders_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')
tools_pybind_dep = dependency('themachinethatgoesping_tools_pybind', required: false)
if not tools_pybind_dep.found()
tools_pybind_dep = subproject('tools').get_variable('tools_pybind_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')