| 1 |
nice_link_args = [] |
| 2 |
|
| 3 |
# libnice.def |
| 4 |
libnice_def = custom_target('libnice.def', |
| 5 |
command: [find_program('gen-def.py'), '@INPUT@'], |
| 6 |
input: 'libnice.sym', |
| 7 |
output: 'libnice.def', |
| 8 |
capture: true) |
| 9 |
|
| 10 |
# map file |
| 11 |
mapfile = custom_target('libnice.map', |
| 12 |
command: [find_program('gen-map.py'), '@INPUT@'], |
| 13 |
input: 'libnice.sym', |
| 14 |
output: 'libnice.map', |
| 15 |
capture: true) |
| 16 |
# We need to check with a file that exists at configure time! |
| 17 |
if cc.has_link_argument('-Wl,--version-script,@0@/libnice.ver'.format(meson.current_source_dir())) |
| 18 |
nice_link_args += ['-Wl,--version-script,@0@'.format(mapfile.full_path())] |
| 19 |
endif |
| 20 |
|
| 21 |
libnice = library('nice', |
| 22 |
link_whole: [libagent, libsocket, libstun, librandom], |
| 23 |
dependencies: nice_deps, |
| 24 |
# Add agent include to uninstalled pkgconfig file |
| 25 |
include_directories: agent_include, |
| 26 |
version : libversion, |
| 27 |
soversion : soversion, |
| 28 |
vs_module_defs: libnice_def, |
| 29 |
link_args: nice_link_args, |
| 30 |
link_depends: mapfile, |
| 31 |
install: true) |
| 32 |
|
| 33 |
version_conf = configuration_data() |
| 34 |
version_conf.set('version_major', version_major) |
| 35 |
version_conf.set('version_minor', version_minor) |
| 36 |
version_conf.set('version_micro', version_micro) |
| 37 |
version_conf.set('version_nano', version_nano) |
| 38 |
nice_version_h = configure_file(input : 'nice-version.h.in', |
| 39 |
output: 'nice-version.h', |
| 40 |
install_dir: get_option('includedir') / 'nice', |
| 41 |
configuration: version_conf) |
| 42 |
|
| 43 |
install_headers('nice.h', subdir: 'nice') |
| 44 |
nice_include = include_directories('.') |
| 45 |
|
| 46 |
nice_gen_sources = [nice_version_h] |
| 47 |
|
| 48 |
# introspection |
| 49 |
build_gir = gir.found() and not get_option('introspection').disabled() |
| 50 |
if build_gir |
| 51 |
nice_gen_sources += [ |
| 52 |
gnome.generate_gir(libnice, |
| 53 |
sources : [agent_headers, agent_sources], |
| 54 |
namespace : 'Nice', |
| 55 |
nsversion : '0.1', |
| 56 |
identifier_prefix : 'Nice', |
| 57 |
symbol_prefix: 'nice', |
| 58 |
export_packages: 'nice', |
| 59 |
includes: ['GObject-2.0', 'Gio-2.0'], |
| 60 |
extra_args: ['--accept-unprefixed'], |
| 61 |
install: true) |
| 62 |
] |
| 63 |
endif |
| 64 |
|
| 65 |
libnice_dep = declare_dependency(link_with : libnice, |
| 66 |
include_directories : [agent_include, nice_include], |
| 67 |
# Everything that uses libnice needs this built to compile |
| 68 |
sources : nice_gen_sources, |
| 69 |
dependencies: nice_deps) |
| 70 |
|
| 71 |
# pkg-config file |
| 72 |
pkg = import('pkgconfig') |
| 73 |
upnp_enabled_string = gupnp_igd_dep.found() ? 'true' : 'false' |
| 74 |
pkg.generate(libnice, |
| 75 |
name: 'libnice', |
| 76 |
filebase: 'nice', |
| 77 |
subdirs: 'nice', |
| 78 |
description: 'ICE library', |
| 79 |
libraries: gio_dep, |
| 80 |
variables: ['upnp_enabled=@0@'.format(upnp_enabled_string)]) |