summaryrefslogtreecommitdiffstats
path: root/src/libudev/meson.build
blob: 3787602a6bddb3bc9a8b776229cfa307c87e8459 (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
56
# SPDX-License-Identifier: LGPL-2.1-or-later

libudev_sources = files(
        'libudev-device.c',
        'libudev-enumerate.c',
        'libudev-hwdb.c',
        'libudev-list.c',
        'libudev-monitor.c',
        'libudev-queue.c',
        'libudev-util.c',
        'libudev.c',
)

############################################################

libudev_includes = [includes, include_directories('.')]

libudev_dir_path = meson.current_source_dir()

libudev_sym = files('libudev.sym')
libudev_sym_path = libudev_dir_path / 'libudev.sym'

install_headers('libudev.h')
libudev_h_path = libudev_dir_path / 'libudev.h'

libudev_basic = static_library(
        'udev-basic',
        libudev_sources,
        include_directories : includes,
        dependencies : userspace,
        c_args : ['-fvisibility=default'],
        build_by_default : false)

static_libudev = get_option('static-libudev')
static_libudev_pic = static_libudev == 'true' or static_libudev == 'pic'

libudev_pc = custom_target(
        'libudev.pc',
        input : 'libudev.pc.in',
        output : 'libudev.pc',
        command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
        install : pkgconfiglibdir != 'no',
        install_tag : 'devel',
        install_dir : pkgconfiglibdir)

############################################################

tests += [
        {
                'sources' : files('test-libudev.c'),
                'link_with' : [
                        libshared,
                        libudev_basic,
                ],
        },
]