-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
160 lines (136 loc) · 3.3 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# SPDX-FileCopyrightText: 2021 Andrea Pappacoda
#
# SPDX-License-Identifier: AGPL-3.0-or-later
project(
'cloudflare-ddns',
'cpp',
default_options: [
'buildtype=release',
'cpp_std=c++17',
'warning_level=3',
'b_lto=true',
'b_ndebug=if-release',
'cpp_rtti=false'
],
version: '2.1.0',
license: 'AGPL-3.0-or-later OR LGPL-3.0-or-later',
meson_version: '>=0.53.0'
)
compiler = meson.get_compiler('cpp')
libcurl_dep = dependency('libcurl', default_options: [
'default_library=static',
'tool=disabled',
'tests=disabled',
'unittests=disabled',
'bindlocal=disabled',
'brotli=disabled',
'cookies=disabled',
'doh=enabled',
'form-api=disabled',
'getoptions=disabled',
'gsasl=disabled',
'http2=auto',
'ipv6=auto',
'libcurl-option=enabled',
'libz=disabled',
'mime=disabled',
'netrc=disabled',
'parsedate=disabled',
'progress-meter=disabled',
'proxy=disabled',
'psl=disabled',
'shuffle-dns=disabled',
'socketpair=disabled',
'sspi=auto',
'unixsockets=disabled',
'verbose-strings=enabled',
'zstd=disabled',
'asynchdns=disabled',
'aws=disabled',
'basic-auth=disabled',
'bearer-auth=enabled',
'digest-auth=disabled',
'kerberos-auth=disabled',
'negotiate-auth=disabled',
'gss-api=disabled',
'idn=disabled',
'alt-svc=disabled',
'headers-api=enabled',
'hsts=disabled',
'http-auth=enabled',
'ntlm=disabled',
'ntlm-wb=disabled',
'ssh=disabled',
'ssl=enabled',
'tls-srp=disabled',
'ssl-default-backend=' + (host_machine.system() == 'windows' ? 'schannel' : 'implicit'),
'openssl=' + (host_machine.system() == 'windows' ? 'disabled' : 'auto'),
'schannel=' + (host_machine.system() == 'windows' ? 'enabled' : 'disabled'),
'dict=disabled',
'file=disabled',
'ftp=disabled',
'gopher=disabled',
'http=enabled',
'imap=disabled',
'ldap=disabled',
'ldaps=disabled',
'mqtt=disabled',
'pop3=disabled',
'rtmp=disabled',
'rtsp=disabled',
'smb=disabled',
'smtp=disabled',
'telnet=disabled',
'tftp=disabled'
])
extra_args = []
if host_machine.system() == 'windows'
default_library = get_option('default_library')
if default_library == 'both'
error('default_library=both is not supported on Windows')
elif default_library == 'shared'
extra_args += '-DDDNS_SHARED_LIB'
endif
endif
# Put kwargs unsupported by muon in a dictionary so that they get used only
# when building with meson
muon_unsupported_kwargs = {}
if not get_option('muon')
muon_unsupported_kwargs = {
'override_options': 'cpp_eh=none'
}
endif
libcloudflare_ddns = library(
'cloudflare-ddns',
'lib'/'cloudflare-ddns.cpp',
cpp_args: extra_args,
dependencies: [libcurl_dep],
extra_files: 'include'/'ddns'/'cloudflare-ddns.h',
gnu_symbol_visibility: 'hidden',
include_directories: 'include',
install: true,
version: meson.project_version(),
kwargs: muon_unsupported_kwargs
)
cloudflare_ddns_dep = declare_dependency(
compile_args: extra_args,
include_directories: 'include',
link_with: libcloudflare_ddns,
version: meson.project_version()
)
install_subdir(
'include'/'ddns',
install_dir: get_option('includedir')
)
if get_option('executable')
subdir('exe')
endif
if get_option('tests')
subdir('tests')
endif
import('pkgconfig').generate(
libcloudflare_ddns,
description: 'Simple utility to dynamically change a DNS record using Cloudflare',
extra_cflags: extra_args,
url: 'https://github.com/Tachi107/cloudflare-ddns'
)