File: meson.build

package info (click to toggle)
libgovirt 0.3.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,780 kB
  • sloc: ansic: 7,013; sh: 4,825; makefile: 280; xml: 86; sed: 16
file content (104 lines) | stat: -rw-r--r-- 3,292 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#
# project definition
#
project('libgovirt', 'c',
        version : '0.3.7',
        license : 'LGPLv2.1',
        meson_version: '>= 0.49.0')

#
# global vars
#
compiler = meson.get_compiler('c')
govirt_version = meson.project_version()
govirt_include = [include_directories('.')]
govirt_includedir = get_option('prefix') / get_option('includedir')
govirt_include_subdir = 'govirt-1.0' / 'govirt'
govirt_deps = []

# libtool versioning - this applies to libgovirt
#
# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91
# for details
#
# increment;
# CURRENT	If the API or ABI interface has changed (reset REVISION to 0)
# REVISION	If the API and ABI remains the same, but bugs are fixed.
# AGE		Don't use.
govirt_current = 4
govirt_revision = 2
govirt_age = 2
govirt_so_version = '@0@.@1@.@2@'.format(govirt_current - govirt_age,
                                         govirt_age,
                                         govirt_revision)

#
# check for dependencies
#
glib_version_info = '>= 2.38'
glib_encoded_version = 'GLIB_VERSION_2_38'

deps = {'gobject-2.0' : glib_version_info,
        'gio-2.0' : glib_version_info,
        'gthread-2.0' : glib_version_info,
        'gobject-introspection-1.0' : '>= 1.30.0',
        'rest-0.7' : '>= 0.7.92',}

foreach dep, version : deps
  govirt_deps += dependency(dep, version : version)
endforeach

#
# global C defines
#
govirt_global_cflags = ['-std=c99',
                        '-DG_LOG_DOMAIN="libgovirt"',
                        '-DGLIB_VERSION_MIN_REQUIRED=@0@'.format(glib_encoded_version),
                        '-DGLIB_VERSION_MAX_ALLOWED=@0@'.format(glib_encoded_version),
                        '-Wall',
                        '-Wextra',
                        '-Werror',
                        '-Wcast-align',
                        '-Wmissing-declarations',
                        '-Wpointer-arith',
                        '-Wcast-align',
                        '-Wwrite-strings',
                        '-Winit-self',
                        '-Wreturn-type',
                        '-Wformat-nonliteral',
                        '-Wformat-security',
                        '-Wmissing-include-dirs',
                        '-Wmissing-format-attribute',
                        '-Wclobbered',
                        '-Wempty-body',
                        '-Wignored-qualifiers',
                        '-Wsign-compare',
                        '-Wtype-limits',
                        '-Wuninitialized',
                        '-Waggregate-return',
                        '-Wdeclaration-after-statement',
                        '-Wshadow',
                        '-Wno-strict-aliasing',
                        '-Winline',
                        '-Wmissing-parameter-type',
                        '-Woverride-init',
                        '-Wno-unused-parameter']

foreach arg : govirt_global_cflags
  add_project_arguments(arg, language : 'c')
endforeach

subdir('govirt')
subdir('po')
subdir('examples')
subdir('tests')


#
# write config.h
#
config_data = configuration_data()
config_data.set_quoted('GETTEXT_PACKAGE', 'libgovirt')
config_data.set_quoted('PACKAGE_STRING', 'libgovirt @0@'.format(govirt_version))

configure_file(output : 'config.h', configuration : config_data)