Skip to content
Snippets Groups Projects
Commit 41c25682 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan
Browse files

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.
parent 5d7d41e0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment