meson.build 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. project('postprocessd', 'c', 'cpp', version: '0.1.2',
  2. default_options : ['c_std=c11', 'cpp_std=c++11'])
  3. add_project_arguments('-D_GNU_SOURCE', language : 'c')
  4. add_project_arguments('-D_GNU_SOURCE', language : 'cpp')
  5. raw = dependency('libraw')
  6. tiff = dependency('libtiff-4')
  7. jpeg = dependency('libjpeg')
  8. exif = dependency('libexif')
  9. cv = dependency('opencv4')
  10. executable('postprocessd', 'main.c','postprocess.c', 'stacker.cpp', 'stackercpp.cpp', 'util.c',
  11. dependencies: [raw, tiff, jpeg, exif, cv],
  12. install: true)
  13. executable('postprocess-single', 'single.c','postprocess.c', 'stacker.cpp', 'stackercpp.cpp', 'util.c',
  14. dependencies: [raw, tiff, jpeg, exif, cv],
  15. install: true)
  16. # Megapixels integration scripts
  17. subdir('megapixels')
  18. # Build and install the man pages
  19. scdoc = dependency('scdoc', native: true, required: get_option('man-pages'))
  20. if scdoc.found()
  21. scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
  22. sh = find_program('sh', native: true)
  23. mandir = get_option('mandir')
  24. man_files = [
  25. 'doc/postprocess-single.1.scd',
  26. ]
  27. foreach filename : man_files
  28. topic = filename.split('.')[-3].split('/')[-1]
  29. section = filename.split('.')[-2]
  30. output = '@0@.@1@'.format(topic, section)
  31. custom_target(
  32. output,
  33. input: filename,
  34. output: output,
  35. command: [
  36. sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output)
  37. ],
  38. install: true,
  39. install_dir: '@0@/man@1@'.format(mandir, section)
  40. )
  41. endforeach
  42. endif