summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2021-10-09 16:16:19 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2021-10-09 16:36:14 +0530
commit41c256824fa2d027cc1f3af0a414d01b2eaea35a (patch)
tree1c51eb2bada85fc2399fc52f925f27e5f2dd86c5
parent5d7d41e06d500295b4c9626f4f698d3d8a231849 (diff)
downloadlibsoup-41c256824fa2d027cc1f3af0a414d01b2eaea35a.tar.gz
meson: Use an gssapi as a proper dependency
There is no need to add it to the project arguments; we should treat it as any other dependency. There's nothing special about it.
-rw-r--r--libsoup/meson.build3
-rw-r--r--meson.build12
2 files changed, 9 insertions, 6 deletions
diff --git a/libsoup/meson.build b/libsoup/meson.build
index 432e294d..e585b3fe 100644
--- a/libsoup/meson.build
+++ b/libsoup/meson.build
@@ -249,6 +249,7 @@ deps = [
libpsl_dep,
brotlidec_dep,
platform_deps,
+ gssapi_dep,
libz_dep,
]
@@ -275,7 +276,7 @@ pkg.generate(libsoup,
libsoup_dep = declare_dependency(link_with : libsoup,
include_directories : configinc,
sources : soup_enum_h,
- dependencies : [ platform_deps, glib_deps ])
+ dependencies : [ platform_deps, gssapi_dep, glib_deps ])
if enable_gnome
soup_gnome_api_name = 'soup-gnome-' + apiversion
diff --git a/meson.build b/meson.build
index eb52f877..4202342a 100644
--- a/meson.build
+++ b/meson.build
@@ -310,12 +310,11 @@ if cc.get_id() == 'msvc'
else
gssapi_lib_type = '64'
endif
- gssapi_lib = cc.find_library('gssapi' + gssapi_lib_type,
+ gssapi_dep = cc.find_library('gssapi' + gssapi_lib_type,
has_headers: 'gssapi/gssapi.h',
required: gssapi_opt)
- if gssapi_lib.found()
+ if gssapi_dep.found()
enable_gssapi = true
- add_project_link_arguments('gssapi@0@.lib'.format(gssapi_lib_type), language : 'c')
endif
else
krb5_config_path = get_option('krb5_config')
@@ -328,9 +327,12 @@ else
cflags_output = run_command (krb5_config, '--cflags', 'gssapi', check: gssapi_opt.enabled())
if libs_output.returncode() == 0 and cflags_output.returncode() == 0
enable_gssapi = true
- add_project_link_arguments(libs_output.stdout().split(), language : 'c')
- add_project_arguments(cflags_output.stdout().split(), language : 'c')
+ gssapi_dep = declare_dependency(
+ link_args: libs_output.stdout().split(),
+ compile_args: cflags_output.stdout().split())
endif
+ else
+ gssapi_dep = dependency('', required: false)
endif
endif