/+junk/libbreezy

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/libbreezy
1 by Gustav Hartvigsson
the start of this dumb experiment
1
api_version = '0.1'
2
3
libbreezy_sources = [
4
  'libbreezy.c',
5
]
6
7
libbreezy_headers = [
8
  'libbreezy.h',
9
  'libbreezy_private.h',
10
  'decls.h',
11
]
12
13
version_split = meson.project_version().split('.')
14
MAJOR_VERSION = version_split[0]
15
MINOR_VERSION = version_split[1]
16
MICRO_VERSION = version_split[2]
17
18
version_conf = configuration_data()
19
version_conf.set('VERSION', meson.project_version())
20
version_conf.set('MAJOR_VERSION', MAJOR_VERSION)
21
version_conf.set('MINOR_VERSION', MINOR_VERSION)
22
version_conf.set('MICRO_VERSION', MICRO_VERSION)
23
24
configure_file(
25
  input: 'libbreezy-version.h.in',
26
  output: 'libbreezy-version.h',
27
  configuration: version_conf,
28
  install: true,
29
  install_dir: join_paths(get_option('includedir'), 'libbreezy')
30
)
31
32
libbreezy_deps = [
33
  dependency ('python3-embed', required : true),
34
]
35
36
libbreezy_lib = shared_library('libbreezy-' + api_version,
37
  libbreezy_sources,
38
  dependencies: libbreezy_deps,
39
  install: true,
40
)
41
42
install_headers(libbreezy_headers, subdir: 'libbreezy')
43
44
pkg = import('pkgconfig')
45
46
pkg.generate(
47
  description: 'C wrapper for Breezy',
48
    libraries: libbreezy_lib,
49
         name: 'libbreezy',
50
     filebase: 'libbreezy-' + api_version,
51
      version: meson.project_version(),
52
      subdirs: 'libbreezy',
53
     requires: ['python3','breezy'],
54
  install_dir: join_paths(get_option('libdir'), 'pkgconfig')
55
)