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
|
glib_genmarshal = find_program('glib-genmarshal')
glib_mkenums = find_program('glib-mkenums')
eggsources = [
'egg-editable-toolbar.c',
'egg-toolbars-model.c',
'egg-toolbar-editor.c'
]
eggheaders = [
'egg-editable-toolbar.h',
'egg-toolbars-model.h',
'egg-toolbar-editor.h'
]
noinst_headers = [
'eggmarshalers.h'
]
eggmarshalers_h = custom_target('eggmarshalers.h',
output: 'eggmarshalers.h',
input: 'eggmarshalers.list',
command: [
glib_genmarshal,
'--prefix=_egg_marshal',
'@INPUT@',
'--header'
],
capture: true
)
eggmarshalers_c = custom_target('eggmarshalers.c',
output: 'eggmarshalers.c',
input: 'eggmarshalers.list',
command: [
glib_genmarshal,
'--prefix=_egg_marshal',
'@INPUT@',
'--body',
'--prototypes'
],
capture: true
)
eggtypebuiltins_h = custom_target('eggtypebuiltins.h',
output: 'eggtypebuiltins.h',
input: eggheaders,
command: [
glib_mkenums,
'--fhead', '#ifndef __EGGTYPEBUILTINS_H__\n#define __EGGTYPEBUILTINS_H__ 1\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n\n',
'--ftail', 'G_END_DECLS\n\n#endif /* __EGGTYPEBUILTINS_H__ */\n',
'--fprod', '\n/* --- @filename@ --- */',
'--eprod', '#define EGG_TYPE_@ENUMSHORT@ @enum_name@_get_type()\nGType @enum_name@_get_type (void);\n',
'@INPUT@'
],
capture: true
)
eggtypebuiltins_c = custom_target('eggtypebuiltins.c',
output: 'eggtypebuiltins.c',
input: eggheaders,
command: [
glib_mkenums,
'--fhead', '#include <config.h>\n\n#include "eggtypebuiltins.h"\n\n',
'--fprod', '\n/* enumerations from "@filename@" */\n#include "@filename@"',
'--vhead', 'static const G@Type@Value _@enum_name@_values[] = {',
'--vprod', ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
'--vtail', ' { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType type = 0;\n\n if (G_UNLIKELY (type == 0))\n type = g_@type@_register_static ("@EnumName@", _@enum_name@_values);\n\n return type;\n}\n\n',
'@INPUT@'
],
capture: true
)
built_sources = [
eggmarshalers_c,
eggmarshalers_h,
eggtypebuiltins_c,
eggtypebuiltins_h
]
# Define the library
libtoolbareditor = static_library('toolbareditor',
sources: [
eggsources,
eggheaders,
built_sources
],
c_args: [
'-DCURSOR_DIR="' + join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) + '"',
],
include_directories: include_directories('.'),
dependencies: shell_core_deps
)
libtoolbareditor_dep = declare_dependency(
link_with: libtoolbareditor,
include_directories: include_directories('.')
)
|