mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
meson: stop linking libcurl into all executables
We set up libcurl via the `libgit_dependencies` variable, which gets propagated into every user of the `libgit` dependency. This is not necessary though, as most of our executables aren't even supposed to link against libcurl. Fix this by only propagating include directories as a libgit dependency and propagating the full curl dependency via `libgit_curl`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
dfc88bd647
commit
f5fac42e07
@@ -927,7 +927,9 @@ if curl.found()
|
|||||||
use_curl_for_imap_send = true
|
use_curl_for_imap_send = true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libgit_dependencies += curl
|
# 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)
|
||||||
libgit_c_args += '-DCURL_DISABLE_TYPECHECK'
|
libgit_c_args += '-DCURL_DISABLE_TYPECHECK'
|
||||||
build_options_config.set('NO_CURL', '')
|
build_options_config.set('NO_CURL', '')
|
||||||
else
|
else
|
||||||
@@ -1666,7 +1668,7 @@ if get_option('curl').enabled()
|
|||||||
'http.c',
|
'http.c',
|
||||||
'http-walker.c',
|
'http-walker.c',
|
||||||
],
|
],
|
||||||
dependencies: [libgit_commonmain],
|
dependencies: [libgit_commonmain, curl],
|
||||||
)
|
)
|
||||||
|
|
||||||
test_dependencies += executable('git-remote-http',
|
test_dependencies += executable('git-remote-http',
|
||||||
|
|||||||
Reference in New Issue
Block a user