~martijnbraam/megapixels

ref: 7c218cddd33a02b6683d754eb8cab7a449b392d8 megapixels/meson.build -rw-r--r-- 2.0 KiB
7c218cddMartijn Braam Redesign data QR dialog 1 year, 19 days ago
                                                                                
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
project('megapixels', 'c', version: '1.2.0')

gnome = import('gnome')
gtkdep = dependency('gtk4')
tiff = dependency('libtiff-4')
zbar = dependency('zbar')
threads = dependency('threads')
# gl = dependency('gl')
epoxy      = dependency('epoxy')

cc = meson.get_compiler('c')
libm = cc.find_library('m', required: false)

subdir('data')

conf = configuration_data()
conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
configure_file(
  output: 'config.h',
  configuration: conf)

add_global_arguments('-DVERSION="@0@"'.format(meson.project_version()), language: 'c')

# Define DEBUG for debug builds only (debugoptimized is not included on this one)
if get_option('buildtype') == 'debug'
  add_global_arguments('-DDEBUG', language: 'c')
endif

# Workaround for libtiff having ABI changes but not changing the internal
# version number
if get_option('tiffcfapattern')
  add_global_arguments('-DLIBTIFF_CFA_PATTERN', language: 'c')
endif

executable('megapixels',
  'src/main.c',
  'src/ini.c',
  'src/gles2_debayer.c',
  'src/gl_util.c',
  'src/camera.c',
  'src/device.c',
  'src/pipeline.c',
  'src/camera_config.c',
  'src/io_pipeline.c',
  'src/process_pipeline.c',
  'src/zbar_pipeline.c',
  'src/matrix.c',
  resources,
  include_directories: 'src/',
  dependencies: [gtkdep, libm, tiff, zbar, threads, epoxy],
  install: true,
  link_args: '-Wl,-ldl')

install_data(
  [
    'config/pine64,pinephone-1.0.ini',
    'config/pine64,pinephone-1.1.ini',
    'config/pine64,pinephone-1.2.ini',
    'config/pine64,pinetab.ini',
  ],
  install_dir: get_option('datadir') / 'megapixels/config/')

# Tools
executable('megapixels-list-devices',
  'tools/list_devices.c',
  'src/device.c',
  include_directories: 'src/',
  dependencies: [gtkdep],
  install: true)

executable('megapixels-camera-test',
  'tools/camera_test.c',
  'src/camera.c',
  'src/device.c',
  include_directories: 'src/',
  dependencies: [gtkdep],
  install: true)