project('postprocessd', 'c', 'cpp', version: '0.3.0', default_options : ['c_std=c11', 'cpp_std=c++11']) add_project_arguments('-D_GNU_SOURCE', language : 'c') add_project_arguments('-D_GNU_SOURCE', language : 'cpp') raw = dependency('libraw') tiff = dependency('libtiff-4') jpeg = dependency('libjpeg') exif = dependency('libexif') cv = dependency('opencv4') lensfun = dependency('lensfun') libdng = dependency('libdng') executable('postprocessd', 'main.c','postprocess.c', 'stacker.cpp', 'stackercpp.cpp', 'util.c', dependencies: [raw, tiff, jpeg, exif, cv, lensfun, libdng], install: true) executable('postprocess-single', 'single.c','postprocess.c', 'stacker.cpp', 'stackercpp.cpp', 'util.c', dependencies: [raw, tiff, jpeg, exif, cv, lensfun, libdng], install: true) # Megapixels integration scripts subdir('megapixels') # Build and install the man pages scdoc = dependency('scdoc', native: true, required: get_option('man-pages')) if scdoc.found() scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) sh = find_program('sh', native: true) mandir = get_option('mandir') man_files = [ 'doc/postprocess-single.1.scd', ] foreach filename : man_files topic = filename.split('.')[-3].split('/')[-1] section = filename.split('.')[-2] output = '@0@.@1@'.format(topic, section) custom_target( output, input: filename, output: output, command: [ sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output) ], install: true, install_dir: '@0@/man@1@'.format(mandir, section) ) endforeach endif