-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
81 lines (76 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
gio_unix_dep = dependency('gio-unix-2.0')
gthread_dep = dependency('gthread-2.0')
gtk_dep = dependency('gtk4')
gtk_print_dep = dependency('gtk4-unix-print')
gtk_binding_names = [
'cairo'
, 'freetype2'
, 'gdk'
, 'gdkpixbuf'
, 'gio'
, 'glib'
, 'gmodule'
, 'gobject'
, 'graphene'
, 'gsk'
, 'gtk'
, 'harfbuzz'
, 'pango'
, 'pangocairo'
]
gen_bindings = custom_target(
output: gtk_binding_names
, command: [
cppgir
, '--output', '@OUTDIR@'
, '--class'
, 'Gtk-4.0'
]
)
touch = find_program('touch')
gen_bindings_dummy_h = custom_target(
output: 'gen_bindings_dummy.h'
, command: [touch, '@OUTPUT@']
, input: gen_bindings
)
binding_src = []
binding_inc = []
foreach b : gtk_binding_names
run_command('mkdir', meson.current_build_dir() / b, check: false)
binding_src += custom_target(
input: gen_bindings_dummy_h
, output: f'@b@.cpp'
, command: [
'cp'
, '@OUTDIR@' / b / f'@b@.cpp'
, '@OUTDIR@' / f'@b@.cpp'
]
)
binding_inc += include_directories(b)
endforeach
gigtkmm_lib = library(
'gigtkmm'
, binding_src
, gen_bindings_dummy_h
, include_directories: [
binding_inc
]
, dependencies: [
cppgir_dep
, gio_unix_dep
, gthread_dep
, gtk_dep
, gtk_print_dep
]
)
gigtkmm_dep = declare_dependency(
sources: gen_bindings_dummy_h
, link_with: gigtkmm_lib
, dependencies: [
cppgir_dep
, gio_unix_dep
, gthread_dep
, gtk_dep
, gtk_print_dep
]
)