meson.build 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. project('megapixels', 'c')
  2. gnome = import('gnome')
  3. gtkdep = dependency('gtk4')
  4. tiff = dependency('libtiff-4')
  5. zbar = dependency('zbar')
  6. threads = dependency('threads')
  7. # gl = dependency('gl')
  8. epoxy = dependency('epoxy')
  9. cc = meson.get_compiler('c')
  10. libm = cc.find_library('m', required: false)
  11. subdir('data')
  12. conf = configuration_data()
  13. conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
  14. conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
  15. configure_file(
  16. output: 'config.h',
  17. configuration: conf)
  18. # Define DEBUG for debug builds only (debugoptimized is not included on this one)
  19. if get_option('buildtype') == 'debug'
  20. add_global_arguments('-DDEBUG', language: 'c')
  21. endif
  22. # Workaround for libtiff having ABI changes but not changing the internal
  23. # version number
  24. if get_option('tiffcfapattern')
  25. add_global_arguments('-DLIBTIFF_CFA_PATTERN', language: 'c')
  26. endif
  27. executable('megapixels',
  28. 'src/main.c',
  29. 'src/ini.c',
  30. 'src/gles2_debayer.c',
  31. 'src/gl_util.c',
  32. 'src/camera.c',
  33. 'src/device.c',
  34. 'src/pipeline.c',
  35. 'src/camera_config.c',
  36. 'src/io_pipeline.c',
  37. 'src/process_pipeline.c',
  38. 'src/zbar_pipeline.c',
  39. 'src/matrix.c',
  40. resources,
  41. include_directories: 'src/',
  42. dependencies: [gtkdep, libm, tiff, zbar, threads, epoxy],
  43. install: true,
  44. link_args: '-Wl,-ldl')
  45. install_data(
  46. [
  47. 'config/pine64,pinephone-1.0.ini',
  48. 'config/pine64,pinephone-1.1.ini',
  49. 'config/pine64,pinephone-1.2.ini',
  50. 'config/pine64,pinetab.ini',
  51. ],
  52. install_dir: get_option('datadir') / 'megapixels/config/')
  53. # Tools
  54. executable('megapixels-list-devices',
  55. 'tools/list_devices.c',
  56. 'src/device.c',
  57. include_directories: 'src/',
  58. dependencies: [gtkdep],
  59. install: true)
  60. executable('megapixels-camera-test',
  61. 'tools/camera_test.c',
  62. 'src/camera.c',
  63. 'src/device.c',
  64. include_directories: 'src/',
  65. dependencies: [gtkdep],
  66. install: true)