meson.build 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. project('megapixels', 'c')
  2. gnome = import('gnome')
  3. gtkdep = dependency('gtk+-3.0')
  4. tiff = dependency('libtiff-4')
  5. threads = dependency('threads')
  6. cc = meson.get_compiler('c')
  7. libm = cc.find_library('m', required: false)
  8. resources = gnome.compile_resources('megapixels-resources', 'org.postmarketos.Megapixels.gresource.xml')
  9. conf = configuration_data()
  10. conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
  11. conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
  12. configure_file(
  13. output: 'config.h',
  14. configuration: conf )
  15. executable('megapixels', 'main.c', 'ini.c', 'quickpreview.c', 'camera.c', 'device.c', 'pipeline.c', resources, dependencies : [gtkdep, libm, tiff, threads], install : true)
  16. install_data(['data/org.postmarketos.Megapixels.desktop'],
  17. install_dir : get_option('datadir') / 'applications')
  18. install_data(['data/org.postmarketos.Megapixels.metainfo.xml'],
  19. install_dir : get_option('datadir') / 'metainfo')
  20. install_data('data/org.postmarketos.Megapixels.svg',
  21. install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps')
  22. )
  23. install_data([
  24. 'config/pine64,pinephone-1.0.ini',
  25. 'config/pine64,pinephone-1.1.ini',
  26. 'config/pine64,pinephone-1.2.ini',
  27. 'config/pine64,pinetab.ini',
  28. ],
  29. install_dir : get_option('datadir') / 'megapixels/config/')
  30. install_data(['postprocess.sh'],
  31. install_dir : get_option('datadir') / 'megapixels/',
  32. install_mode: 'rwxr-xr-x')
  33. executable('list_devices', 'tools/list_devices.c', 'device.c', dependencies: [gtkdep])
  34. executable('test_camera', 'tools/test_camera.c', 'camera.c', 'device.c', dependencies: [gtkdep])