diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-01-04 13:13:30 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-01-18 23:06:32 +0100 |
commit | 3976f372ae91e1cbe5ff9873aadfc2c43400452e (patch) | |
tree | d9130f7257146124b6e94db0b5849c18922808b1 /src/libudev | |
parent | meson: move and gather find_program() (diff) | |
download | systemd-3976f372ae91e1cbe5ff9873aadfc2c43400452e.tar.xz systemd-3976f372ae91e1cbe5ff9873aadfc2c43400452e.zip |
meson: move libudev related definitions to src/libudev/meson.build
Also, this makes libudev.so built in build directory.
Diffstat (limited to 'src/libudev')
-rw-r--r-- | src/libudev/meson.build | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/src/libudev/meson.build b/src/libudev/meson.build index 3bd00ff4cc..61153baffc 100644 --- a/src/libudev/meson.build +++ b/src/libudev/meson.build @@ -1,26 +1,43 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -libudev_sources = files(''' - libudev.c - libudev-device.c - libudev-device-internal.h - libudev-enumerate.c - libudev-hwdb.c - libudev-list.c - libudev-list-internal.h - libudev-monitor.c - libudev-queue.c - libudev-util.c - libudev-util.h -'''.split()) +libudev_sources = files( + 'libudev-device.c', + 'libudev-device-internal.h', + 'libudev-enumerate.c', + 'libudev-hwdb.c', + 'libudev-list.c', + 'libudev-list-internal.h', + 'libudev-monitor.c', + 'libudev-queue.c', + 'libudev-util.c', + 'libudev-util.h', + 'libudev.c', + 'libudev.h') ############################################################ +libudev_includes = [includes, include_directories('.')] + libudev_sym = files('libudev.sym') -libudev_sym_path = meson.current_source_dir() + '/libudev.sym' +libudev_sym_path = join_paths(meson.current_source_dir(), 'libudev.sym') install_headers('libudev.h') -libudev_h_path = '@0@/libudev.h'.format(meson.current_source_dir()) +libudev_h_path = join_paths(meson.current_source_dir(), 'libudev.h') + +libudev_basic = static_library( + 'udev-basic', + libudev_sources, + include_directories : includes, + c_args : ['-fvisibility=default']) + +libudev_static = static_library( + 'udev_static', + include_directories : includes, + link_with : udev_link_with, + link_whole : libudev_basic) + +static_libudev = get_option('static-libudev') +static_libudev_pic = static_libudev == 'true' or static_libudev == 'pic' configure_file( input : 'libudev.pc.in', |