summaryrefslogtreecommitdiff
path: root/meson.build
blob: e948cb0b1b992b22b0a902d9ad36fd9ad442cb8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
project('gupnp', 'c', version : '1.1.0')
gnome = import('gnome')
pkg = import('pkgconfig')

cc = meson.get_compiler('c')

conf = configuration_data()
conf.set_quoted('VERSION', meson.project_version())

netlink_test = '''#include <sys/socket.h>
#include <linux/rtnetlink.h>
'''
netlink_available = cc.compiles(netlink_test, name : 'linux/rtnetlink.h availability')
conf.set('HAVE_NETLINK', netlink_available)

ifaddrs_test = '#include <ifaddrs.h>'
ifaddrs_available = cc.compiles(ifaddrs_test, name : 'ifaddrs.h availability')
conf.set('HAVE_IFADDRS_H', ifaddrs_available)

wireless_test ='''#include <sys/socket.h>
#include <linux/wireless.h>
'''
conf.set('HAVE_LINUX_WIRELESS_H',
         cc.compiles(wireless_test, name : 'linux/wireless.h availability'))

config_h = configure_file(output : 'config.h', configuration : conf)
add_global_arguments('-DHAVE_CONFIG_H=1', language : 'c')

guul = subproject('guul', default_options : ['default_library=static'])

dependencies = [
    dependency('glib-2.0', version : '>= 2.40'),
    dependency('gio-2.0', version : '>= 2.40'),
    dependency('gmodule-2.0', version : '>= 2.40'),
    dependency('gssdp-1.2', version : '>= 1.1'),
    dependency('libsoup-2.4', version : '>= 2.48.0'),
    dependency('libxml-2.0'),
    guul.get_variable('guul')
]

subdir('libgupnp')
subdir('tests')
subdir('tools')

if get_option('vapi') and get_option('introspection')
    subdir('vala')
endif

if get_option('gtk_doc')
    subdir('doc')
endif

if get_option('examples')
    subdir('examples')
endif