File: meson.build

package info (click to toggle)
zchunk 1.1.16%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 4,256 kB
  • sloc: ansic: 7,875; python: 464; sh: 204; makefile: 12
file content (73 lines) | stat: -rw-r--r-- 1,988 bytes parent folder | download
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
73
project(
    'zck', 'c',
    version : '1.1.16',
    meson_version : '>=0.44.0',
    default_options : ['c_std=gnu99']
)

so_version = '1'

common_cflags = [
    '-Wunused-result',
]
cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments(common_cflags), language : 'c')

if build_machine.system() == 'freebsd'
    add_project_arguments('-DFREEBSD', language : 'c')
endif

if get_option('with-zstd') == 'disabled'
    zstd_dep = dependency('', required : false)
else
    zstd_dep = dependency('libzstd', required : get_option('with-zstd') == 'enabled')
    if zstd_dep.found()
        add_project_arguments('-DZCHUNK_ZSTD', language : 'c')
        if zstd_dep.version().version_compare('<=1.4.9')
            add_project_arguments('-DOLD_ZSTD', language : 'c')
        endif
    endif
endif

curl_dep = dependency('libcurl')

if build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
    argplib = cc.find_library('argp')
else
    argplib = dependency('', required : false)
endif

if get_option('with-openssl') == 'disabled'
    openssl_dep = dependency('', required : false)
else
    openssl_dep = dependency('openssl', required : get_option('with-openssl') == 'enabled')
    if openssl_dep.found()
        add_project_arguments('-DZCHUNK_OPENSSL', language : 'c')
    endif
endif

inc = include_directories('include')

subdir('include')
subdir('src')
if not get_option('coverity')
    subdir('test')
endif

pkg_mod = import('pkgconfig')
pkg_mod.generate(
    libraries : zcklib,
    version : meson.project_version(),
    name : 'libzck',
    filebase : 'zck',
    description : 'A library for generating easy-to-delta files.'
)

install_man([
    'doc/unzck.1',
    'doc/zck.1',
    'doc/zck_delta_size.1',
    'doc/zck_gen_zdict.1',
    'doc/zck_read_header.1',
    'doc/zckdl.1',
])