|
| 1 | +# `curl_config.h` generation. {{ |
| 2 | + |
| 3 | +config_h = configure_file( |
| 4 | + configuration: cdata, |
| 5 | + input: '../meson/curl_config.h.meson', |
| 6 | + output: 'curl_config.h', |
| 7 | +) |
| 8 | + |
| 9 | +add_project_arguments('-DHAVE_CONFIG_H', language: 'c') |
| 10 | + |
| 11 | +# }}} |
| 12 | + |
| 13 | +# To update this list: `make -f meson/rewrite.mk curl_lib_src`. |
| 14 | +curl_lib_src = files( |
| 15 | + 'vauth/cleartext.c', |
| 16 | + 'vauth/cram.c', |
| 17 | + 'vauth/digest.c', |
| 18 | + 'vauth/digest_sspi.c', |
| 19 | + 'vauth/gsasl.c', |
| 20 | + 'vauth/krb5_gssapi.c', |
| 21 | + 'vauth/krb5_sspi.c', |
| 22 | + 'vauth/ntlm.c', |
| 23 | + 'vauth/ntlm_sspi.c', |
| 24 | + 'vauth/oauth2.c', |
| 25 | + 'vauth/spnego_gssapi.c', |
| 26 | + 'vauth/spnego_sspi.c', |
| 27 | + 'vauth/vauth.c', |
| 28 | + 'vquic/curl_msh3.c', |
| 29 | + 'vquic/curl_ngtcp2.c', |
| 30 | + 'vquic/curl_quiche.c', |
| 31 | + 'vquic/vquic.c', |
| 32 | + 'vssh/libssh.c', |
| 33 | + 'vssh/libssh2.c', |
| 34 | + 'vssh/wolfssh.c', |
| 35 | + 'vtls/bearssl.c', |
| 36 | + 'vtls/gskit.c', |
| 37 | + 'vtls/gtls.c', |
| 38 | + 'vtls/hostcheck.c', |
| 39 | + 'vtls/keylog.c', |
| 40 | + 'vtls/mbedtls.c', |
| 41 | + 'vtls/mbedtls_threadlock.c', |
| 42 | + 'vtls/nss.c', |
| 43 | + 'vtls/openssl.c', |
| 44 | + 'vtls/rustls.c', |
| 45 | + 'vtls/schannel.c', |
| 46 | + 'vtls/schannel_verify.c', |
| 47 | + 'vtls/sectransp.c', |
| 48 | + 'vtls/vtls.c', |
| 49 | + 'vtls/wolfssl.c', |
| 50 | + 'vtls/x509asn1.c', |
| 51 | + 'altsvc.c', |
| 52 | + 'amigaos.c', |
| 53 | + 'asyn-ares.c', |
| 54 | + 'asyn-thread.c', |
| 55 | + 'base64.c', |
| 56 | + 'bufref.c', |
| 57 | + 'c-hyper.c', |
| 58 | + 'cf-https-connect.c', |
| 59 | + 'cf-socket.c', |
| 60 | + 'cfilters.c', |
| 61 | + 'conncache.c', |
| 62 | + 'connect.c', |
| 63 | + 'content_encoding.c', |
| 64 | + 'cookie.c', |
| 65 | + 'curl_addrinfo.c', |
| 66 | + 'curl_des.c', |
| 67 | + 'curl_endian.c', |
| 68 | + 'curl_fnmatch.c', |
| 69 | + 'curl_get_line.c', |
| 70 | + 'curl_gethostname.c', |
| 71 | + 'curl_gssapi.c', |
| 72 | + 'curl_log.c', |
| 73 | + 'curl_memrchr.c', |
| 74 | + 'curl_multibyte.c', |
| 75 | + 'curl_ntlm_core.c', |
| 76 | + 'curl_ntlm_wb.c', |
| 77 | + 'curl_path.c', |
| 78 | + 'curl_range.c', |
| 79 | + 'curl_rtmp.c', |
| 80 | + 'curl_sasl.c', |
| 81 | + 'curl_sspi.c', |
| 82 | + 'curl_threads.c', |
| 83 | + 'dict.c', |
| 84 | + 'doh.c', |
| 85 | + 'dynbuf.c', |
| 86 | + 'easy.c', |
| 87 | + 'easygetopt.c', |
| 88 | + 'easyoptions.c', |
| 89 | + 'escape.c', |
| 90 | + 'file.c', |
| 91 | + 'fileinfo.c', |
| 92 | + 'fopen.c', |
| 93 | + 'formdata.c', |
| 94 | + 'ftp.c', |
| 95 | + 'ftplistparser.c', |
| 96 | + 'getenv.c', |
| 97 | + 'getinfo.c', |
| 98 | + 'gopher.c', |
| 99 | + 'h2h3.c', |
| 100 | + 'hash.c', |
| 101 | + 'headers.c', |
| 102 | + 'hmac.c', |
| 103 | + 'hostasyn.c', |
| 104 | + 'hostip.c', |
| 105 | + 'hostip4.c', |
| 106 | + 'hostip6.c', |
| 107 | + 'hostsyn.c', |
| 108 | + 'hsts.c', |
| 109 | + 'http.c', |
| 110 | + 'http2.c', |
| 111 | + 'http_aws_sigv4.c', |
| 112 | + 'http_chunks.c', |
| 113 | + 'http_digest.c', |
| 114 | + 'http_negotiate.c', |
| 115 | + 'http_ntlm.c', |
| 116 | + 'http_proxy.c', |
| 117 | + 'idn.c', |
| 118 | + 'if2ip.c', |
| 119 | + 'imap.c', |
| 120 | + 'inet_ntop.c', |
| 121 | + 'inet_pton.c', |
| 122 | + 'krb5.c', |
| 123 | + 'ldap.c', |
| 124 | + 'llist.c', |
| 125 | + 'md4.c', |
| 126 | + 'md5.c', |
| 127 | + 'memdebug.c', |
| 128 | + 'mime.c', |
| 129 | + 'mprintf.c', |
| 130 | + 'mqtt.c', |
| 131 | + 'multi.c', |
| 132 | + 'netrc.c', |
| 133 | + 'nonblock.c', |
| 134 | + 'noproxy.c', |
| 135 | + 'openldap.c', |
| 136 | + 'parsedate.c', |
| 137 | + 'pingpong.c', |
| 138 | + 'pop3.c', |
| 139 | + 'progress.c', |
| 140 | + 'psl.c', |
| 141 | + 'rand.c', |
| 142 | + 'rename.c', |
| 143 | + 'rtsp.c', |
| 144 | + 'select.c', |
| 145 | + 'sendf.c', |
| 146 | + 'setopt.c', |
| 147 | + 'sha256.c', |
| 148 | + 'share.c', |
| 149 | + 'slist.c', |
| 150 | + 'smb.c', |
| 151 | + 'smtp.c', |
| 152 | + 'socketpair.c', |
| 153 | + 'socks.c', |
| 154 | + 'socks_gssapi.c', |
| 155 | + 'socks_sspi.c', |
| 156 | + 'speedcheck.c', |
| 157 | + 'splay.c', |
| 158 | + 'strcase.c', |
| 159 | + 'strdup.c', |
| 160 | + 'strerror.c', |
| 161 | + 'strtok.c', |
| 162 | + 'strtoofft.c', |
| 163 | + 'system_win32.c', |
| 164 | + 'telnet.c', |
| 165 | + 'tftp.c', |
| 166 | + 'timediff.c', |
| 167 | + 'timeval.c', |
| 168 | + 'transfer.c', |
| 169 | + 'url.c', |
| 170 | + 'urlapi.c', |
| 171 | + 'version.c', |
| 172 | + 'version_win32.c', |
| 173 | + 'warnless.c', |
| 174 | + 'ws.c', |
| 175 | +) |
| 176 | + |
| 177 | +curl_lib = library( |
| 178 | + 'curl', |
| 179 | + config_h, |
| 180 | + curl_lib_src, |
| 181 | + c_args: [ |
| 182 | + '-DBUILDING_LIBCURL', |
| 183 | + curl_symbols_hiding_flags, |
| 184 | + ], |
| 185 | + dependencies: [lib_deps, sys_deps], |
| 186 | + gnu_symbol_visibility: curl_symbols_hiding_visibility, |
| 187 | + include_directories: [CURL_PUBLIC_INC, CURL_INTERNAL_INC], |
| 188 | + install: true, |
| 189 | + version: '4.8.0', |
| 190 | +) |
| 191 | + |
| 192 | +pkg.generate( |
| 193 | + curl_lib, |
| 194 | + description: 'Library to transfer files with ftp, http, etc.', |
| 195 | + name: 'libcurl', |
| 196 | + unescaped_variables: ( |
| 197 | + # NOTE: variables with empty values are not allowed… |
| 198 | + ( |
| 199 | + enabled_features.length() > 0 ? { |
| 200 | + 'supported_features': ' '.join(enabled_features), |
| 201 | + } : {} |
| 202 | + ) + ( |
| 203 | + enabled_protocols.length() > 0 ? { |
| 204 | + 'supported_protocols': ' '.join(enabled_protocols), |
| 205 | + } : {} |
| 206 | + ) |
| 207 | + ), |
| 208 | + url: 'https://curl.se/', |
| 209 | +) |
| 210 | + |
| 211 | +curl_dep = declare_dependency( |
| 212 | + include_directories: CURL_PUBLIC_INC, |
| 213 | + link_with: curl_lib, |
| 214 | + sources: config_h, |
| 215 | +) |
| 216 | + |
| 217 | +meson.override_dependency('libcurl', curl_dep) |
| 218 | + |
| 219 | +lib_deps_iflags = [] |
| 220 | +foreach _dep : lib_deps |
| 221 | + lib_deps_iflags += _dep.partial_dependency( |
| 222 | + compile_args: true, |
| 223 | + includes: true, |
| 224 | + ) |
| 225 | +endforeach |
| 226 | + |
| 227 | +curl_iflags_dep = declare_dependency( |
| 228 | + dependencies: lib_deps_iflags, |
| 229 | + include_directories: [CURL_PUBLIC_INC, CURL_INTERNAL_INC], |
| 230 | +) |
| 231 | + |
| 232 | +curl_ilib_dep = declare_dependency( |
| 233 | + dependencies: [curl_dep, curl_iflags_dep, sys_deps], |
| 234 | +) |
| 235 | + |
| 236 | +curlu_flags = [ |
| 237 | + '-DCURL_STATICLIB', |
| 238 | + '-DUNITTESTS', |
| 239 | +] |
| 240 | + |
| 241 | +curlu_lib = static_library( |
| 242 | + 'curlu', |
| 243 | + config_h, |
| 244 | + curl_lib_src, |
| 245 | + c_args: [ |
| 246 | + curlu_flags, |
| 247 | + '-DBUILDING_LIBCURL', |
| 248 | + ], |
| 249 | + dependencies: [build_unittests, lib_deps], |
| 250 | + include_directories: [CURL_PUBLIC_INC, CURL_INTERNAL_INC], |
| 251 | +) |
| 252 | + |
| 253 | +curlu_dep = declare_dependency( |
| 254 | + dependencies: sys_deps, |
| 255 | + include_directories: [CURL_INTERNAL_INC, CURL_PUBLIC_INC], |
| 256 | + link_with: curlu_lib, |
| 257 | + sources: config_h, |
| 258 | +) |
| 259 | + |
| 260 | +# vim: foldmethod=marker foldlevel=0 |
0 commit comments