-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmeson.build
58 lines (47 loc) · 1.58 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
project('opencv-glib', 'c', 'cpp',
version: '1.0.4',
license: 'BSD-3-Clause',
default_options: [
'cpp_std=c++11',
])
api_version = '1.0'
library_version = '1.0.0'
c_compiler = meson.get_compiler('c')
cpp_compiler = meson.get_compiler('cpp')
prefix = get_option('prefix')
include_dir = join_paths(prefix, get_option('includedir'))
data_dir = join_paths(prefix, get_option('datadir'))
gnome = import('gnome')
pkgconfig = import('pkgconfig')
root_inc = include_directories('.')
subdir('opencv-glib')
if get_option('gtk_doc')
subdir('doc/reference')
endif
run_test = find_program('test/run-test.sh')
test('unit test', run_test)
tag_message = '@0@ @1@ has been released!!!'.format(meson.project_name(),
meson.project_version())
tag = custom_target('tag',
command: [
'git',
'-C', meson.source_root(),
'tag',
'-a',
'-m', tag_message,
meson.project_version(),
],
output: ['tag'])
tag_push = custom_target('tag-push',
command: [
'git',
'-C', meson.source_root(),
'push',
'--tags',
],
depends: [tag],
output: ['tag-push'])
custom_target('release',
command: ['echo', tag_message],
depends: [tag_push],
output: ['release'])