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
|
# Meson file for Colloquium
project('colloquium', 'c',
version : '0.5.0',
license : 'GPL3+',
default_options : ['buildtype=debugoptimized'])
datadir=join_paths(get_option('datadir'), 'colloquium')
add_project_arguments('-DPACKAGE_VERSION="'+meson.project_version()+'"', language : 'c')
add_project_arguments('-DDATADIR="'+join_paths(get_option('prefix'), datadir)+'"',
language : 'c')
add_project_arguments('-DLOCALEDIR="'+join_paths(get_option('prefix'), get_option('localedir'))+'"',
language : 'c')
# Localisation
subdir('po')
# Dependencies
gnome = import('gnome')
gtk_dep = dependency('gtk+-3.0', required : true)
glib_dep = dependency('glib-2.0', required : true)
gio_dep = dependency('gio-2.0', required : true)
cairo_dep = dependency('cairo', required : true)
pango_dep = dependency('pango', required : true)
gdkpixbuf_dep = dependency('gdk-pixbuf-2.0', required : true)
cc = meson.get_compiler('c')
# Compiled-in resources
gresources = gnome.compile_resources('colloquium-resources',
'data/colloquium.gresource.xml',
source_dir: 'data', c_name: 'colloquium')
# libstorycode
libstorycode_includes = include_directories('libstorycode')
flex = find_program('flex')
bison = find_program('bison')
flex_gen = generator(flex,
output : ['@BASENAME@_lex.c', '@BASENAME@_lex.h'],
arguments : ['--outfile=@OUTPUT0@',
'--header-file=@OUTPUT1@',
'@INPUT@'])
bison_gen = generator(bison,
output : ['@BASENAME@_parse.c', '@BASENAME@_parse.h'],
arguments : ['--output=@OUTPUT0@',
'--defines=@OUTPUT1@',
'--report=all',
'@INPUT@'])
storycode_parse_ch = bison_gen.process('libstorycode/storycode.y')
storycode_lex_ch = flex_gen.process('libstorycode/storycode.l')
libstorycode = library('storycode',
['libstorycode/narrative.c',
'libstorycode/slide.c',
'libstorycode/presentation.c',
'libstorycode/stylesheet.c',
'libstorycode/storycode.c',
storycode_lex_ch,
storycode_parse_ch,
],
include_directories : libstorycode_includes,
install : true)
libstorycode_dep = declare_dependency(include_directories : libstorycode_includes,
link_with : libstorycode)
# libstorycode-cairo
libstorycode_cairo_includes = include_directories('libstorycode/cairo')
libstorycode_cairo = library('storycode-cairo',
['libstorycode/cairo/render.c',
],
include_directories : libstorycode_cairo_includes,
dependencies : [cairo_dep, pango_dep, gdkpixbuf_dep,
libstorycode_dep],
install : true)
libstorycode_cairo_dep = declare_dependency(include_directories : libstorycode_cairo_includes,
link_with : libstorycode_cairo)
# libstorycode-gtk
#libstorycode_gtk_includes = include_directories('libstorycode/gtk')
#
#libstorycode_gtk = library('storycode-gtk',
# ['libstorycode/gtk/gtknarrativeview.c',
# 'libstorycode/gtk/gtkslideview.c',
# ],
# include_directories : libstorycode_gtk_includes,
# dependencies : [gtk_dep, libstorycode_dep,
# libstorycode_cairo_dep],
# install : true)
#
#libstorycode_gtk_dep = declare_dependency(include_directories : libstorycode_gtk_includes,
# link_with : libstorycode_gtk)
# pdfstorycode
executable('pdfstorycode',
['src/pdfstorycode.c',
],
gresources,
dependencies : [glib_dep, gio_dep, cairo_dep,
libstorycode_dep, libstorycode_cairo_dep])
# Main program
#executable('colloquium',
# ['src/colloquium.c',
# 'src/narrative_window.c',
# 'src/render.c',
# 'src/slideshow.c',
# 'src/debugger.c',
# 'src/pr_clock.c',
# 'src/sc_editor.c',
# 'src/slide_window.c',
# 'src/frame.c',
# 'src/presentation.c',
# 'src/sc_interp.c',
# 'src/testcard.c',
# 'src/imagestore.c',
# 'src/print.c',
# 'src/sc_parse.c',
# 'src/utils.c',
# 'src/stylesheet.c',
# 'src/stylesheet_editor.c',
# ],
# gresources,
# dependencies : [gtkdep, mdep, jsondep],
# install : true)
# Desktop file
install_data(['data/colloquium.desktop'],
install_dir : get_option('datadir')+'/applications')
# Icon
install_data(['data/colloquium.svg'],
install_dir : get_option('datadir')+'/icons/hicolor/scalable/apps')
# Tests
subdir('tests')
|