summaryrefslogtreecommitdiffstats
path: root/libuuid/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:10:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:10:49 +0000
commitcfe5e3905201349e9cf3f95d52ff4bd100bde37d (patch)
treed0baf160cbee3195249d095f85e52d20c21acf02 /libuuid/meson.build
parentInitial commit. (diff)
downloadutil-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.tar.xz
util-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.zip
Adding upstream version 2.39.3.upstream/2.39.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libuuid/meson.build')
-rw-r--r--libuuid/meson.build51
1 files changed, 51 insertions, 0 deletions
diff --git a/libuuid/meson.build b/libuuid/meson.build
new file mode 100644
index 0000000..a801b4e
--- /dev/null
+++ b/libuuid/meson.build
@@ -0,0 +1,51 @@
+dir_libuuid = include_directories('src')
+
+lib_uuid_sources = '''
+ src/uuidP.h
+ src/clear.c
+ src/compare.c
+ src/copy.c
+ src/gen_uuid.c
+ src/isnull.c
+ src/pack.c
+ src/parse.c
+ src/uuidd.h
+ src/uuid_time.c
+'''.split()
+
+predefined_c = files('src/predefined.c')
+unpack_c = files('src/unpack.c')
+unparse_c = files('src/unparse.c')
+
+libuuid_sym = 'src/libuuid.sym'
+libuuid_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libuuid_sym)
+
+lib_uuid = both_libraries(
+ 'uuid',
+ list_h,
+ lib_uuid_sources,
+ predefined_c,
+ unpack_c,
+ unparse_c,
+ randutils_c,
+ md5_c,
+ sha1_c,
+ include_directories : [dir_include, dir_libuuid],
+ link_depends : libuuid_sym,
+ version : libuuid_version,
+ link_args : ['-Wl,--version-script=@0@'.format(libuuid_sym_path)],
+ dependencies : [socket_libs,
+ build_libuuid ? [] : disabler()],
+ install : build_libuuid)
+uuid_dep = declare_dependency(link_with: lib_uuid, include_directories: dir_libuuid)
+
+if build_libuuid
+ pkgconfig.generate(lib_uuid,
+ description : 'Universally unique id library',
+ subdirs : 'uuid',
+ version : pc_version)
+ install_headers('src/uuid.h', subdir : 'uuid')
+ if meson.version().version_compare('>=0.54.0')
+ meson.override_dependency('uuid', uuid_dep)
+ endif
+endif