]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/libudev/meson.build
meson: Use dicts for test definitions
[thirdparty/systemd.git] / src / libudev / meson.build
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
3a726fcd 2
3976f372
YW
3libudev_sources = files(
4 'libudev-device.c',
3976f372
YW
5 'libudev-enumerate.c',
6 'libudev-hwdb.c',
7 'libudev-list.c',
3976f372
YW
8 'libudev-monitor.c',
9 'libudev-queue.c',
10 'libudev-util.c',
3976f372 11 'libudev.c',
4a7ee0a5 12)
5c23128d
ZJS
13
14############################################################
15
3976f372
YW
16libudev_includes = [includes, include_directories('.')]
17
0c06b506 18libudev_sym = files('libudev.sym')
fce9abb2 19libudev_sym_path = meson.current_source_dir() / 'libudev.sym'
5c23128d 20
5c23128d 21install_headers('libudev.h')
fce9abb2 22libudev_h_path = meson.current_source_dir() / 'libudev.h'
3976f372
YW
23
24libudev_basic = static_library(
25 'udev-basic',
26 libudev_sources,
27 include_directories : includes,
03f7ddf0
ZJS
28 c_args : ['-fvisibility=default'],
29 build_by_default : false)
3976f372 30
3976f372
YW
31static_libudev = get_option('static-libudev')
32static_libudev_pic = static_libudev == 'true' or static_libudev == 'pic'
5c23128d 33
039f1673 34libudev_pc = custom_target(
ba29ee4c 35 'libudev.pc',
37efbbd8
ZJS
36 input : 'libudev.pc.in',
37 output : 'libudev.pc',
8f04a1ca 38 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
ba29ee4c 39 install : pkgconfiglibdir != 'no',
260c0a80 40 install_tag : 'devel',
ba29ee4c 41 install_dir : pkgconfiglibdir)
e025c9df
YW
42
43############################################################
44
45tests += [
822cd3ff
JJ
46 {
47 'sources' : files('test-libudev.c'),
48 'link_with' : [
49 libshared,
50 libudev_basic,
51 ],
52 },
e025c9df 53]