meson.build 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. project('postprocessd', 'c', 'cpp', version: '0.3.0',
  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. lensfun = dependency('lensfun')
  11. libdng = dependency('libdng')
  12. executable('postprocessd', 'main.c','postprocess.c', 'stacker.cpp', 'stackercpp.cpp', 'util.c',
  13. dependencies: [raw, tiff, jpeg, exif, cv, lensfun, libdng],
  14. install: true)
  15. executable('postprocess-single', 'single.c','postprocess.c', 'stacker.cpp', 'stackercpp.cpp', 'util.c',
  16. dependencies: [raw, tiff, jpeg, exif, cv, lensfun, libdng],
  17. install: true)
  18. # Megapixels integration scripts
  19. subdir('megapixels')
  20. # Build and install the man pages
  21. scdoc = dependency('scdoc', native: true, required: get_option('man-pages'))
  22. if scdoc.found()
  23. scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
  24. sh = find_program('sh', native: true)
  25. mandir = get_option('mandir')
  26. man_files = [
  27. 'doc/postprocess-single.1.scd',
  28. ]
  29. foreach filename : man_files
  30. topic = filename.split('.')[-3].split('/')[-1]
  31. section = filename.split('.')[-2]
  32. output = '@0@.@1@'.format(topic, section)
  33. custom_target(
  34. output,
  35. input: filename,
  36. output: output,
  37. command: [
  38. sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output)
  39. ],
  40. install: true,
  41. install_dir: '@0@/man@1@'.format(mandir, section)
  42. )
  43. endforeach
  44. endif