aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
blob: 0cb533c271d17a19c62b733107cd250df2ae884a (plain)
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
# SPDX-License-Identifier: LGPL-2.1
#
# Copyright (c) 2023 Daniel Wagner, SUSE LLC

project(
    'libtracefs', ['c'],
    meson_version: '>= 0.50.0',
    license: 'LGPL-2.1',
    version: '1.8.0',
    default_options: [
        'c_std=gnu99',
        'buildtype=debug',
        'default_library=both',
        'prefix=/usr/local',
        'warning_level=1'])

library_version = meson.project_version()

libtraceevent_dep = dependency('libtraceevent', version: '>= 1.8.1', required: true)
threads_dep = dependency('threads', required: true)
cunit_dep = dependency('cunit', required : false)

prefixdir = get_option('prefix')
bindir = join_paths(prefixdir, get_option('bindir'))
mandir = join_paths(prefixdir, get_option('mandir'))
htmldir = join_paths(prefixdir, get_option('htmldir'))

add_project_arguments(
    [
        '-D_GNU_SOURCE',
    ],
    language : 'c')

incdir = include_directories(['include'])

subdir('src')
subdir('include')
if get_option('utest') and cunit_dep.found()
    subdir('utest')
endif
if get_option('samples')
subdir('samples')
endif

if get_option('doc')
subdir('Documentation')

custom_target(
    'docs',
    output: 'docs',
    depends: [html, man],
    command: ['echo'])
endif