]>
Commit | Line | Data |
---|---|---|
d4c880d5 ZJS |
1 | dir_libuuid = include_directories('src') |
2 | ||
3 | lib_uuid_sources = ''' | |
4 | src/uuidP.h | |
5 | src/clear.c | |
6 | src/compare.c | |
7 | src/copy.c | |
8 | src/gen_uuid.c | |
9 | src/isnull.c | |
10 | src/pack.c | |
11 | src/parse.c | |
12 | src/uuidd.h | |
13 | src/uuid_time.c | |
14 | '''.split() | |
15 | ||
16 | predefined_c = files('src/predefined.c') | |
17 | unpack_c = files('src/unpack.c') | |
18 | unparse_c = files('src/unparse.c') | |
19 | ||
20 | libuuid_sym = 'src/libuuid.sym' | |
21 | libuuid_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libuuid_sym) | |
22 | ||
21da7370 JW |
23 | libuuid_link_depends = [] |
24 | libuuid_link_args = [] | |
25 | ||
26 | if cc.has_link_argument('-Wl,--version-script=@0@'.format(libuuid_sym_path)) | |
27 | libuuid_link_depends += [libuuid_sym] | |
28 | libuuid_link_args += ['-Wl,--version-script=@0@'.format(libuuid_sym_path)] | |
29 | endif | |
30 | ||
d4c880d5 ZJS |
31 | lib_uuid = both_libraries( |
32 | 'uuid', | |
33 | list_h, | |
34 | lib_uuid_sources, | |
35 | predefined_c, | |
36 | unpack_c, | |
37 | unparse_c, | |
38 | randutils_c, | |
39 | md5_c, | |
40 | sha1_c, | |
41 | include_directories : [dir_include, dir_libuuid], | |
21da7370 | 42 | link_depends : libuuid_link_depends, |
d4c880d5 | 43 | version : libuuid_version, |
21da7370 | 44 | link_args : libuuid_link_args, |
d4c880d5 ZJS |
45 | dependencies : [socket_libs, |
46 | build_libuuid ? [] : disabler()], | |
47 | install : build_libuuid) | |
eefff5aa | 48 | uuid_dep = declare_dependency(link_with: lib_uuid, include_directories: dir_libuuid) |
d4c880d5 | 49 | |
3f7734ae TW |
50 | if build_libuuid |
51 | pkgconfig.generate(lib_uuid, | |
52 | description : 'Universally unique id library', | |
53 | subdirs : 'uuid', | |
54 | version : pc_version) | |
55 | install_headers('src/uuid.h', subdir : 'uuid') | |
a2464983 | 56 | if meson.version().version_compare('>=0.54.0') |
eefff5aa | 57 | meson.override_dependency('uuid', uuid_dep) |
a2464983 | 58 | endif |
3f7734ae | 59 | endif |