Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Olivier Crête
libnice
Commits
fefe5119
Commit
fefe5119
authored
Nov 02, 2018
by
Tim-Philipp Müller
Committed by
Olivier Crête
Dec 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
meson: allow selecting crypto library manually via an option
parent
0e0f89d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
meson.build
meson.build
+30
-2
meson_options.txt
meson_options.txt
+1
-0
nice/meson.build
nice/meson.build
+1
-1
No files found.
meson.build
View file @
fefe5119
...
...
@@ -165,10 +165,38 @@ foreach w : warnings
endforeach
# Dependencies
gnutls_dep = dependency('gnutls', version: gnutls_req)
glib_dep = dependency('gio-2.0', version: glib_req)
gthread_dep = dependency('gthread-2.0')
# Cryto library
opt_cryptolib = get_option('crypto-library')
message('Crypto library: ' + opt_cryptolib)
if opt_cryptolib != 'openssl'
crypto_dep = dependency('gnutls', version: gnutls_req, required: false)
cdata.set('HAVE_GNUTLS', crypto_dep.found())
if not crypto_dep.found()
if opt_cryptolib != 'auto'
error('GnuTLS requested as crypto library, but not found')
endif
crypto_dep = dependency('openssl', required: false)
cdata.set('HAVE_OPENSSL', crypto_dep.found())
endif
else
crypto_dep = dependency('openssl', required: false)
cdata.set('HAVE_OPENSSL', crypto_dep.found())
if not crypto_dep.found()
if opt_cryptolib != 'auto'
error('OpenSSL requested as crypto library, but not found')
endif
crypto_dep = dependency('gnutls', version: gnutls_req, required: false)
cdata.set('HAVE_GNUTLS', crypto_dep.found())
endif
endif
if not crypto_dep.found()
error('Either GnuTLS or OpenSSL is required as crypto library, but neither was found')
endif
# GStreamer
gst_dep = dependency('gstreamer-base-1.0', version: gst_req,
required: get_option('gstreamer'),
...
...
@@ -184,7 +212,7 @@ libm = cc.find_library('m', required: false)
nice_incs = include_directories('.', 'agent', 'random', 'socket', 'stun')
nice_deps = [glib_dep, gthread_dep,
gnutls
_dep, gupnp_igd_dep] + syslibs
nice_deps = [glib_dep, gthread_dep,
crypto
_dep, gupnp_igd_dep] + syslibs
ignored_iface_prefix = get_option('ignored-network-interface-prefix')
if ignored_iface_prefix != ''
...
...
meson_options.txt
View file @
fefe5119
...
...
@@ -4,6 +4,7 @@ option('gstreamer', type: 'feature', value: 'auto',
description: 'Enable or disable build of GStreamer plugins')
option('ignored-network-interface-prefix', type: 'string', value: '',
description: 'Ignore network interfaces whose name starts with this string in the ICE connection check algorithm. For example, "virbr" to ignore virtual bridge interfaces added by virtd, which do not help in finding connectivity.')
option('crypto-library', type: 'combo', choices : ['auto', 'gnutls', 'openssl'], value : 'auto')
# Common feature options
option('examples', type : 'feature', value : 'auto', yield : true,
...
...
nice/meson.build
View file @
fefe5119
...
...
@@ -62,5 +62,5 @@ pkg.generate(libnice,
subdirs: 'nice',
description: 'ICE library',
requires: glib_dep,
requires_private: [gthread_dep, gupnp_igd_dep,
gnutls
_dep, syslibs],
requires_private: [gthread_dep, gupnp_igd_dep,
crypto
_dep, syslibs],
variables: ['upnp_enabled=@0@'.format(upnp_enabled_string)])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment