/+junk/libbreezy

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/libbreezy

« back to all changes in this revision

Viewing changes to src/meson.build

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-13 15:54:51 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210113155451-b8bj2e5saxiysvqc
the start of this dumb experiment

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
)