megapixels/meson.build

79 lines
2.0 KiB
Meson
Raw Normal View History

2021-09-10 01:39:03 +00:00
project('megapixels', 'c', version: '1.3.0')
2020-09-18 14:10:15 +00:00
gnome = import('gnome')
2021-04-15 13:14:20 +00:00
gtkdep = dependency('gtk4')
2020-09-26 21:30:15 +00:00
tiff = dependency('libtiff-4')
zbar = dependency('zbar')
2020-10-24 03:36:28 +00:00
threads = dependency('threads')
# gl = dependency('gl')
epoxy = dependency('epoxy')
2020-09-08 12:35:34 +00:00
cc = meson.get_compiler('c')
libm = cc.find_library('m', required: false)
subdir('data')
2020-01-24 00:03:47 +00:00
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)
2021-06-13 21:23:13 +00:00
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')
2020-11-08 17:16:15 +00:00
install_data(
[
'config/pine64,pinephone-1.0.ini',
'config/pine64,pinephone-1.1.ini',
'config/pine64,pinephone-1.2.ini',
'config/pine64,pinetab.ini',
2020-09-18 15:13:46 +00:00
],
install_dir: get_option('datadir') / 'megapixels/config/')
2020-10-24 03:36:28 +00:00
2020-11-26 10:39:38 +00:00
# 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)