-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
32 lines (27 loc) · 985 Bytes
/
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
project('canas', 'cpp',
version: '3.0.5',
default_options: ['cpp_std=c++17',
'warning_level=2'])
sources = ['src/core.cpp',
'src/crc16ibm.cpp',
'src/errors.cpp',
'src/serdes.cpp',
'src/utils.cpp']
defines = []
if host_machine.endian() == 'big'
defines += '-DCANAS_BIG_ENDIAN'
else
defines += '-DCANAS_LITTLE_ENDIAN'
endif
if host_machine.system() == 'linux'
sources += 'src/cansocket.cpp'
endif
canas_raw_dep = declare_dependency(compile_args: defines,
sources: sources,
include_directories: include_directories('include'))
canas_lib = static_library('canas',
dependencies: canas_raw_dep)
canas_dep = declare_dependency(compile_args: defines,
link_with: canas_lib,
include_directories: include_directories('include'))
subdir('tests')