-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
68 lines (66 loc) · 1.26 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
project(
'gdpm',
'cpp',
default_options: ['cpp_std=c++20', 'build.cpp_std=c++20']
)
deps = [
dependency('Threads'),
dependency('RapidJSON'),
dependency('fmt'),
dependency('Catch2'),
dependency('doctest'),
dependency('cxxopts'),
# dependency('curl'),
dependency('curlpp'),
dependency('libzip'),
dependency('sqlite3')
]
includes = include_directories('include')
src = [
'src/config.cpp',
'src/package_manager.cpp',
'src/rest_api.cpp',
'src/utils.cpp',
'src/http.cpp',
'src/cache.cpp'
]
cpp_args = [
'-Ofast',
# '-fPIC',
# '-fPIE',
# '-fconcepts',
# '-fsanitize=address',
# '-lcurl',
# '-lzip'
'-fpermissive',
'-Wall',
'-Wno-switch',
'-Wno-unused-variable',
'-Wno-sign-conversion',
'-Wno-unused-function',
'-pedantic-errors',
'-DGDPM_LOG_LEVEL=2',
'-DGDPM_REQUEST_DELAY=200ms',
'-DGDPM_ENABLE_COLORS=1',
'-DGDPM_ENABLE_TIMESTAMPS=1',
'-DGDPM_TIMESTAMP_FORMAT=":%I:%M:%S %p; %Y-%m-%d"',
'-DRAPIDJSON_HAS_STDSTRING=1'
]
lib = shared_library(
meson.project_name(),
src,
dependencies: deps,
version: '1.0',
soversion: '0',
include_directories: includes,
cpp_args: cpp_args
)
exe = executable(
meson.project_name(),
'src/main.cpp',
dependencies: deps,
include_directories: includes,
link_with: lib,
cpp_args: cpp_args
)
test('gdpm-tests', exe)