summaryrefslogtreecommitdiff
path: root/meson.build
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 /meson.build
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.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 7 insertions, 5 deletions
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