-
Notifications
You must be signed in to change notification settings - Fork 75
/
meson.build
167 lines (143 loc) Β· 3.99 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
project('Marker', 'c',
version : '2020.04.04',
license : 'GPL3'
)
PREFIX = get_option('prefix')
DATA_DIR = join_paths(PREFIX, 'share')
LIBS_DIR = join_paths(PREFIX, 'lib')
APP_DIR = join_paths(DATA_DIR, 'com.github.fabiocolacio.marker')
ICONS_DIR = join_paths(APP_DIR, 'icons')
STYLES_DIR = join_paths(APP_DIR, 'styles')
COMMON_DIR = join_paths(APP_DIR, 'common')
SCRIPTS_DIR = join_paths(APP_DIR, 'scripts')
HIGHLIGHT_STYLES_DIR = join_paths(join_paths(SCRIPTS_DIR, 'highlight'),'styles')
WEB_EXTENSIONS_DIRECTORY = join_paths(LIBS_DIR, 'Marker.extensions')
APPDATA_DIR = join_paths(DATA_DIR, 'metainfo')
LOCALE_DIR = join_paths(PREFIX, get_option('localedir'))
EXECUTABLE_NAME = 'marker'
gnome = import('gnome')
i18n = import('i18n')
subdir('help')
subdir('po')
res = gnome.compile_resources(
'marker_resources',
'src/resources/marker.gresource.xml',
source_dir : 'src/resources'
)
marker_sources = [
'src/marker.c',
'src/marker-editor.c',
'src/marker-window.c',
'src/marker-exporter.c',
'src/marker-markdown.c',
'src/marker-prefs.c',
'src/marker-source-view.c',
'src/marker-preview.c',
'src/marker-string.c',
'src/marker-widget.c',
'src/marker-sketcher-window.c',
'src/marker-utils.c',
res
]
scroll_extension = [
'src/webkit-extension/scroll-extension.c'
]
click_extension = [
'src/webkit-extension/click-extension.c'
]
hoedown_sources = [
'src/scidown/src/autolink.c',
'src/scidown/src/buffer.c',
'src/scidown/src/document.c',
'src/scidown/src/escape.c',
'src/scidown/src/html.c',
'src/scidown/src/utils.c',
'src/scidown/src/latex.c',
'src/scidown/src/html_blocks.c',
'src/scidown/src/html_smartypants.c',
'src/scidown/src/stack.c',
'src/scidown/src/version.c',
'src/scidown/src/constants.c',
'src/scidown/src/charter/src/charter_string.c',
'src/scidown/src/charter/src/csv_parser/csvparser.c',
'src/scidown/src/charter/src/tinyexpr/tinyexpr.c',
'src/scidown/src/charter/src/clist.c',
'src/scidown/src/charter/src/parser.c',
'src/scidown/src/charter/src/charter.c',
'src/scidown/src/charter/src/svg.c',
'src/scidown/src/charter/src/latex.c',
'src/scidown/src/charter/src/svg_utils.c'
]
deps = [
dependency('gtk+-3.0', version : '>=3.20'),
dependency('glib-2.0'),
dependency('gtksourceview-3.0'),
dependency('webkit2gtk-4.1'),
dependency('gtkspell3-3.0')
]
ext_deps =[
dependency('webkit2gtk-4.1')
]
add_global_arguments(
'-DSTYLES_DIR="@0@/"'.format(STYLES_DIR),
'-DSCRIPTS_DIR="@0@/"'.format(SCRIPTS_DIR),
'-DICONS_DIR="@0@/"'.format(ICONS_DIR),
'-DHIGHLIGHT_STYLES_DIR="@0@/"'.format(HIGHLIGHT_STYLES_DIR),
'-DMARKER_VERSION="@0@"'.format(meson.project_version()),
'-DLOCALE_DIR="@0@"'.format(LOCALE_DIR),
'-DCOMMON_DIR="@0@/"'.format(COMMON_DIR),
'-DWEB_EXTENSIONS_DIRECTORY="@0@"'.format(WEB_EXTENSIONS_DIRECTORY),
language : 'c'
)
shared_library(
'scroll-extension',
sources : [scroll_extension],
dependencies : ext_deps,
install : true,
link_args: '-lm',
install_dir: WEB_EXTENSIONS_DIRECTORY
)
executable(
EXECUTABLE_NAME,
sources : [marker_sources, hoedown_sources],
dependencies : deps,
link_args: '-lm',
install : true
)
install_data(
'data/com.github.fabiocolacio.marker.svg',
install_dir : join_paths(DATA_DIR, 'icons/hicolor/scalable/apps')
)
install_data(
'data/com.github.fabiocolacio.marker-symbolic.svg',
install_dir : join_paths(DATA_DIR, 'icons/hicolor/symbolic/apps')
)
install_data(
'data/com.github.fabiocolacio.marker.desktop',
install_dir : join_paths(DATA_DIR, 'applications')
)
install_data(
'data/com.github.fabiocolacio.marker.gschema.xml',
install_dir : join_paths(DATA_DIR, 'glib-2.0/schemas')
)
install_data(
'data/com.github.fabiocolacio.marker.appdata.xml',
install_dir : APPDATA_DIR
)
install_subdir(
'data/styles',
install_dir : APP_DIR
)
install_subdir(
'data/common',
install_dir : APP_DIR
)
install_subdir(
'data/scripts',
install_dir : APP_DIR
)
install_subdir(
'data/icons',
install_dir : APP_DIR
)
meson.add_install_script('post-install.sh')