aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-02-21 22:34:53 +0100
committerThomas White <taw@bitwiz.me.uk>2019-02-21 22:34:53 +0100
commit108384e83edcfd22b09eefe1cc6013d0c4d93f54 (patch)
tree1378d9489d30c3dace9766b6e5f6647596bb3c82 /meson.build
parent2a1e0fe6db0d2980b4c7a8e413a7c81aadbc0dd1 (diff)
Skeleton for libstorycode-cairo and libstorycode-gtk
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build56
1 files changed, 49 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index ee790d0..38564a0 100644
--- a/meson.build
+++ b/meson.build
@@ -4,8 +4,6 @@ project('colloquium', 'c',
license : 'GPL3+',
default_options : ['buildtype=debugoptimized'])
-gnome = import('gnome')
-
datadir=join_paths(get_option('datadir'), 'colloquium')
add_project_arguments('-DPACKAGE_VERSION="'+meson.project_version()+'"', language : 'c')
@@ -14,16 +12,23 @@ add_project_arguments('-DDATADIR="'+join_paths(get_option('prefix'), datadir)+'"
add_project_arguments('-DLOCALEDIR="'+join_paths(get_option('prefix'), get_option('localedir'))+'"',
language : 'c')
+
# Localisation
subdir('po')
+
# Dependencies
-gtkdep = dependency('gtk+-3.0')
-glib_dep = dependency('glib-2.0')
-gio_dep = dependency('gio-2.0')
+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')
-mdep = cc.find_library('m', required : false)
+
+# Compiled-in resources
gresources = gnome.compile_resources('colloquium-resources',
'data/colloquium.gresource.xml',
source_dir: 'data', c_name: 'colloquium')
@@ -67,11 +72,45 @@ libstorycode_dep = declare_dependency(include_directories : libstorycode_include
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, libstorycode_dep])
+ dependencies : [glib_dep, gio_dep, cairo_dep,
+ libstorycode_dep, libstorycode_cairo_dep])
+
# Main program
#executable('colloquium',
@@ -98,13 +137,16 @@ executable('pdfstorycode',
# 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')