Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1110,23 +1110,6 @@ else
build_options_config.set('USE_LIBPCRE2', '')
endif

curl = dependency('libcurl', version: '>=7.21.3', required: get_option('curl'), default_options: ['default_library=static', 'tests=disabled', 'tool=disabled'])
use_curl_for_imap_send = false
if curl.found()
if curl.version().version_compare('>=7.34.0')
libgit_c_args += '-DUSE_CURL_FOR_IMAP_SEND'
use_curl_for_imap_send = true
endif

# Most executables don't have to link against libcurl, but we still need its
# include directories so that we can resolve LIBCURL_VERSION in "help.c".
libgit_dependencies += curl.partial_dependency(includes: true)
build_options_config.set('NO_CURL', '')
else
libgit_c_args += '-DNO_CURL'
build_options_config.set('NO_CURL', '1')
endif

expat = dependency('expat', required: get_option('expat'), default_options: ['default_library=static', 'build_tests=false'])
if expat.found()
libgit_dependencies += expat
Expand Down Expand Up @@ -1547,6 +1530,23 @@ if https_backend != 'openssl'
libgit_c_args += '-DNO_OPENSSL'
endif

curl = dependency('libcurl', version: '>=7.21.3', required: get_option('curl'), default_options: ['default_library=static', 'tests=disabled', 'tool=disabled'])
use_curl_for_imap_send = false
if curl.found()
if curl.version().version_compare('>=7.34.0')
libgit_c_args += '-DUSE_CURL_FOR_IMAP_SEND'
use_curl_for_imap_send = true
endif

# Most executables don't have to link against libcurl, but we still need its
# include directories so that we can resolve LIBCURL_VERSION in "help.c".
libgit_dependencies += curl.partial_dependency(includes: true)
build_options_config.set('NO_CURL', '')
else
libgit_c_args += '-DNO_CURL'
build_options_config.set('NO_CURL', '1')
endif

if sha1_backend == 'sha1dc'
libgit_c_args += '-DSHA1_DC'
libgit_c_args += '-DSHA1DC_NO_STANDARD_INCLUDES=1'
Expand Down
Loading