-
Notifications
You must be signed in to change notification settings - Fork 14
/
meson.build
56 lines (46 loc) · 1.2 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
project('dasynq', 'cpp',
default_options: [
'b_lto=true',
'b_ndebug=if-release',
'buildtype=debugoptimized',
'c_std=c++11',
'warning_level=3',
# 'werror=true',
],
license: 'Apache-2.0',
version: '2.1.0',
)
dasynq_deps = []
if target_machine.system() == 'freebsd'
dasynq_deps += meson.get_compiler('cpp').find_library('rt')
endif
dasynq_dep = declare_dependency(
dependencies: dasynq_deps,
include_directories: include_directories('include'),
)
if meson.is_subproject()
subdir_done()
endif
install_subdir('include',
install_dir: 'include',
strip_directory: true,
)
pc = import('pkgconfig')
pc.generate(
description: 'Thread-safe cross-platform event loop library in C++',
filebase: 'dasynq',
libraries: dasynq_deps,
name: 'Dasynq',
url: 'http://github.com/davmac314/dasynq',
)
executable('chatserver', 'examples/chatserver/chatserver.cc',
dependencies: dasynq_dep,
)
threads_dep = dependency('threads')
executable('chatserver_mt', 'examples/chatserver/chatserver-mt.cc',
dependencies: [dasynq_dep, threads_dep],
)
dasynq_test = executable('dasynq_test', 'tests/dasynq-tests.cc',
dependencies: [dasynq_dep, threads_dep],
)
test('dasynq_test', dasynq_test)