megapixels/meson.build

59 lines
2.3 KiB
Meson
Raw Normal View History

2020-09-03 01:48:47 +02:00
project('megapixels', 'c')
2020-09-18 16:10:15 +02:00
gnome = import('gnome')
gtkdep = dependency('gtk+-3.0')
2020-09-26 23:30:15 +02:00
tiff = dependency('libtiff-4')
2020-10-24 05:36:28 +02:00
threads = dependency('threads')
2020-09-08 14:35:34 +02:00
cc = meson.get_compiler('c')
libm = cc.find_library('m', required: false)
2020-09-18 16:10:15 +02:00
resources = gnome.compile_resources('megapixels-resources', 'org.postmarketos.Megapixels.gresource.xml')
2020-01-24 01:03:47 +01: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 )
# 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', 'main.c', 'ini.c', 'quickpreview.c', 'camera.c', 'device.c', 'pipeline.c', 'camera_config.c', 'io_pipeline.c', 'process_pipeline.c', 'matrix.c', resources, dependencies : [gtkdep, libm, tiff, threads], install : true)
2020-09-03 17:42:03 +02:00
2020-11-08 18:16:15 +01:00
install_data(['data/org.postmarketos.Megapixels.desktop'],
2020-09-03 17:42:03 +02:00
install_dir : get_option('datadir') / 'applications')
2020-09-03 18:11:15 +02:00
2020-11-08 18:16:15 +01:00
install_data(['data/org.postmarketos.Megapixels.metainfo.xml'],
install_dir : get_option('datadir') / 'metainfo')
install_data('data/org.postmarketos.Megapixels.svg',
2020-09-03 18:11:15 +02:00
install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps')
)
2020-09-18 17:13:46 +02:00
install_data([
'config/pine64,pinephone-1.0.ini',
'config/pine64,pinephone-1.1.ini',
'config/pine64,pinephone-1.2.ini',
2020-09-23 18:43:08 +02:00
'config/pine64,pinetab.ini',
2020-09-18 17:13:46 +02:00
],
install_dir : get_option('datadir') / 'megapixels/config/')
2020-10-01 17:25:24 +02:00
install_data(['postprocess.sh'],
install_dir : get_option('datadir') / 'megapixels/',
install_mode: 'rwxr-xr-x')
2020-10-24 05:36:28 +02:00
2020-11-26 11:39:38 +01:00
# Tools
2020-12-06 15:48:04 +01:00
executable('megapixels-list-devices', 'tools/list_devices.c', 'device.c', dependencies: [gtkdep], install: true)
executable('megapixels-camera-test', 'tools/camera_test.c', 'camera.c', 'device.c', dependencies: [gtkdep], install: true)
test_quickpreview = executable('test_quickpreview', 'tests/test_quickpreview.c', 'quickpreview.c', 'camera.c', dependencies: [gtkdep])
test('quickpreview', test_quickpreview)