This repository has been archived by the owner on Oct 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
/
meson.build
77 lines (69 loc) · 1.27 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
67
68
69
70
71
72
73
74
75
76
77
project(
'delaunay-triangulation',
'cpp',
version: '2.1.0',
license: 'MIT',
meson_version: '>=0.50.0',
default_options: [
'cpp_std=c++17',
'warning_level=3',
'werror=true',
'buildtype=debug',
],
)
add_project_arguments(
'-Wshadow',
'-Wnon-virtual-dtor',
'-Wold-style-cast',
'-Wcast-align',
'-Wunused',
'-Woverloaded-virtual',
'-Wconversion',
'-Wsign-conversion',
'-Wno-format-nonliteral',
'-Wfatal-errors',
language: 'cpp',
)
if (get_option('buildtype') == 'release')
# todo
endif
include = include_directories('include')
install_headers(
'include/vector2.h',
'include/edge.h',
'include/triangle.h',
'include/delaunay.h',
subdir: 'dt',
)
lib_dt = shared_library(
meson.project_name(),
files(
'dt/vector2.cpp',
'dt/edge.cpp',
'dt/triangle.cpp',
'dt/delaunay.cpp',
),
version: meson.project_version(),
include_directories: include,
install: true,
)
dt = declare_dependency(
link_with: lib_dt,
include_directories: include,
)
catch2 = dependency('catch2', required : false)
if catch2.found()
tests = executable(
'tests',
'tests/tests.cpp',
dependencies: [dt, catch2],
)
endif
sfml = dependency('sfml-graphics', required : false)
if sfml.found()
example = executable(
'example',
'example/main.cpp',
dependencies: [dt, sfml],
)
endif