2019-08-26 20:43:39 +02:00
|
|
|
curl_dep = dependency('libcurl', version: '>= 7.33', required: get_option('curl'))
|
2017-12-29 17:12:55 +01:00
|
|
|
conf.set('ENABLE_CURL', curl_dep.found())
|
|
|
|
if not curl_dep.found()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2021-09-21 13:24:15 +02:00
|
|
|
if is_windows
|
|
|
|
# Our Windows build generates a static libcurl build, but libcurl's
|
|
|
|
# CMakeLists.txt omits the -DCURL_STATICLIB compiler option
|
|
|
|
curl_dep = declare_dependency(compile_args: '-DCURL_STATICLIB',
|
|
|
|
dependencies: curl_dep)
|
|
|
|
endif
|
|
|
|
|
2017-12-29 17:12:55 +01:00
|
|
|
curl = static_library(
|
|
|
|
'curl',
|
|
|
|
'Delegate.cxx',
|
|
|
|
'Version.cxx',
|
|
|
|
'Init.cxx',
|
|
|
|
'Global.cxx',
|
|
|
|
'Request.cxx',
|
2019-10-15 13:24:06 +02:00
|
|
|
'Escape.cxx',
|
2017-12-29 17:12:55 +01:00
|
|
|
'Form.cxx',
|
|
|
|
include_directories: inc,
|
|
|
|
dependencies: [
|
2020-01-18 19:45:56 +01:00
|
|
|
log_dep,
|
2017-12-29 17:12:55 +01:00
|
|
|
curl_dep,
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
curl_dep = declare_dependency(
|
|
|
|
link_with: curl,
|
|
|
|
dependencies: [
|
|
|
|
event_dep,
|
|
|
|
util_dep,
|
|
|
|
curl_dep,
|
|
|
|
],
|
|
|
|
)
|