meson.build 1.49 KB
Newer Older
1 2
project(
  'libgepub', 'c',
3
  version: '0.6.0',
4
  license: 'LGPL2+',
5
  default_options: 'buildtype=debugoptimized',
6
  meson_version: '>= 0.41.0'
7 8 9 10 11 12
)

gepub_version = meson.project_version()
version_array = gepub_version.split('.')
gepub_major_version = version_array[0].to_int()
gepub_minor_version = version_array[1].to_int()
13 14
gepub_version_micro = version_array[2].to_int()
gepub_api_version = '@0@.@1@'.format(gepub_major_version, gepub_minor_version)
15
gepub_lib_name = '@0@-@1@'.format(meson.project_name(), gepub_api_version)
16 17 18 19 20 21 22

gepub_gir_ns = 'Gepub'
gepub_gir_version = '1.0'

gepub_prefix = get_option('prefix')
gepub_datadir = join_paths(gepub_prefix, get_option('datadir'))
gepub_libdir = join_paths(gepub_prefix, get_option('libdir'))
23
gepub_libexecdir = join_paths(gepub_prefix, get_option('libexecdir'))
24 25 26 27 28 29 30 31 32
gepub_includedir = join_paths(gepub_prefix, get_option('includedir'))

soversion = 0
current = 0
revision = 0
libversion = '@0@.@1@.@2@'.format(soversion, current, revision)

cc = meson.get_compiler('c')

33
gepub_deps = [
34
  dependency('gepub_internals', fallback: ['libgepub_internals', 'libgepub_internals_dep']),
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
  dependency('webkit2gtk-4.0'),
  dependency('libsoup-2.4'),
  dependency('glib-2.0'),
  dependency('gobject-2.0'),
  dependency('gio-2.0'),
  dependency('libxml-2.0'),
  dependency('libarchive')
]

gnome = import('gnome')
pkg = import('pkgconfig')

top_inc = include_directories('.')

subdir('libgepub')
subdir('tests')
51 52 53 54 55

configure_file(
  output: 'config.h',
  configuration: configuration_data()
)