File: meson.build

package info (click to toggle)
util-linux 2.41.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 92,844 kB
  • sloc: ansic: 179,146; sh: 22,716; yacc: 1,284; makefile: 525; xml: 422; python: 316; lex: 89; ruby: 75; csh: 37; exp: 19; sed: 16; perl: 15; sql: 9
file content (72 lines) | stat: -rw-r--r-- 1,741 bytes parent folder | download | duplicates (3)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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()

subdir('man')

predefined_c = files('src/predefined.c')
pack_c = files('src/pack.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)

libuuid_link_depends = []
libuuid_link_args = []

if cc.has_link_argument('-Wl,--version-script=@0@'.format(libuuid_sym_path))
	libuuid_link_depends += [libuuid_sym]
	libuuid_link_args += ['-Wl,--version-script=@0@'.format(libuuid_sym_path)]
endif

thread_dep = dependency('threads')

lib_uuid = library(
  '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_link_depends,
  version : libuuid_version,
  link_args : libuuid_link_args,
  dependencies : [socket_libs, thread_dep,
                  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

test_uuid_time_sources = files('src/gen_uuid.c') + [
  pack_c,
  unpack_c,
  randutils_c,
  md5_c,
  sha1_c,
]