-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
99 lines (88 loc) · 2.75 KB
/
meson.build
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
## Copyright (C) 2017 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public License
## as published by the Free Software Foundation; either version 2.1
## of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library; if not, write to the Free
## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
project('gxlib', 'c',
version: '2.0.1',
license: 'LGPLV2.1+'
)
glibdep = dependency('glib-2.0', version: '>= 2.38')
gobjectdep = dependency('gobject-2.0', version: '>= 2.38')
giodep = dependency('gio-2.0', version: '>= 2.38')
cc = meson.get_compiler('c')
libm = cc.find_library('m', required : false)
#
# gxlib
#
gxlib_srcs=[
'gxlib/gxfunc.c',
'gxlib/gxlist.c',
'gxlib/gxoption.c',
'gxlib/gxpath.c',
'gxlib/gxpred.c',
'gxlib/gxstr.c'
]
gxlib_hdrs=[
'gxlib/gxfunc.h',
'gxlib/gxlib.h',
'gxlib/gxlist.h',
'gxlib/gxoption.h',
'gxlib/gxpath.h',
'gxlib/gxpred.h',
'gxlib/gxstr.h'
]
gxlib = shared_library('gxlib-2.0', gxlib_srcs,
version: meson.project_version(),
include_directories: include_directories('gxlib'),
dependencies: [glibdep, libm],
install: true)
gxlib_dep = declare_dependency(
include_directories: include_directories('gxlib/'),
link_with : gxlib)
subdir('gxlib/tests')
# generate gxlib-2.0.pc
pkg = import('pkgconfig')
gxlib_pc = pkg.generate(libraries: gxlib,
name: 'gxlib-2.0',
filebase: 'gxlib-2.0',
version: meson.project_version(),
description: 'Extensions for GLib 2.x',
requires: 'glib-2.0')
# gxio
#
gxiolib_srcs=[
'gxio/gxdirwatcher.c'
]
gxiolib_hdrs=[
'gxio/gxdirwatcher.h',
'gxio/gxio.h'
]
gxiolib = shared_library('gxio-2.0', gxiolib_srcs,
version: meson.project_version(),
include_directories: include_directories('gxio'),
dependencies: [glibdep, giodep, gobjectdep],
install: true)
gxio_dep = declare_dependency(
include_directories: include_directories('gxio/'),
link_with : gxiolib)
subdir('gxio/tests')
# generate gxio-2.0.pc
pkg = import('pkgconfig')
gxio_pc = pkg.generate(libraries: gxiolib,
name: 'gxio-2.0',
filebase: 'gxio-2.0',
version: meson.project_version(),
description: 'Extensions for GIO 2.x',
requires: ['gio-2.0', 'gobject-2.0'])