-# Protobuf compilation.
-gen = generator(protoc, \
- output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'],
- arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@'])
-proto_generated = gen.process(['state.proto', 'midi_mapping.proto', 'json.proto'])
-protobuf_lib = static_library('protobufs', proto_generated, dependencies: nageru_deps, include_directories: nageru_include_dirs)
-protobuf_hdrs = declare_dependency(sources: proto_generated)
-nageru_link_with += protobuf_lib
-
-# Preprocess Qt as needed.
-qt_files = qt5.preprocess(
- moc_headers: ['aboutdialog.h', 'analyzer.h', 'clickable_label.h', 'compression_reduction_meter.h', 'correlation_meter.h',
- 'ellipsis_label.h', 'glwidget.h', 'input_mapping_dialog.h', 'lrameter.h', 'mainwindow.h', 'midi_mapping_dialog.h',
- 'nonlinear_fader.h', 'vumeter.h'],
- ui_files: ['aboutdialog.ui', 'analyzer.ui', 'audio_expanded_view.ui', 'audio_miniview.ui', 'display.ui',
- 'input_mapping.ui', 'mainwindow.ui', 'midi_mapping.ui'],
- dependencies: qt5deps)
-
-# Qt objects.
-srcs += ['glwidget.cpp', 'mainwindow.cpp', 'vumeter.cpp', 'lrameter.cpp', 'compression_reduction_meter.cpp',
- 'correlation_meter.cpp', 'aboutdialog.cpp', 'analyzer.cpp', 'input_mapping_dialog.cpp', 'midi_mapping_dialog.cpp',
- 'nonlinear_fader.cpp', 'context_menus.cpp', 'vu_common.cpp', 'piecewise_interpolator.cpp', 'midi_mapper.cpp']
-
-# Auxiliary objects used for nearly everything.
-aux_srcs = ['metrics.cpp', 'flags.cpp']
-aux = static_library('aux', aux_srcs, dependencies: nageru_deps, include_directories: nageru_include_dirs)
-nageru_link_with += aux
-
-# Audio objects.
-audio_mixer_srcs = ['audio_mixer.cpp', 'alsa_input.cpp', 'alsa_pool.cpp', 'ebu_r128_proc.cc', 'stereocompressor.cpp',
- 'resampling_queue.cpp', 'flags.cpp', 'correlation_measurer.cpp', 'filter.cpp', 'input_mapping.cpp']
-audio = static_library('audio', audio_mixer_srcs, dependencies: [nageru_deps, protobuf_hdrs], include_directories: nageru_include_dirs)
-nageru_link_with += audio
-
-# Mixer objects.
-srcs += ['chroma_subsampler.cpp', 'v210_converter.cpp', 'mixer.cpp', 'pbo_frame_allocator.cpp',
- 'context.cpp', 'theme.cpp', 'image_input.cpp', 'alsa_output.cpp',
- 'disk_space_estimator.cpp', 'timecode_renderer.cpp', 'tweaked_inputs.cpp']
-
-# Streaming and encoding objects (largely the set that is shared between Nageru and Kaeru).
-stream_srcs = ['quicksync_encoder.cpp', 'x264_encoder.cpp', 'x264_dynamic.cpp', 'x264_speed_control.cpp', 'video_encoder.cpp',
- 'metacube2.cpp', 'mux.cpp', 'audio_encoder.cpp', 'ffmpeg_raii.cpp', 'ffmpeg_util.cpp', 'httpd.cpp', 'ffmpeg_capture.cpp',
- 'print_latency.cpp', 'basic_stats.cpp', 'ref_counted_frame.cpp']
-stream = static_library('stream', stream_srcs, dependencies: nageru_deps, include_directories: nageru_include_dirs)
-nageru_link_with += stream
-
-# DeckLink.
-srcs += ['decklink_capture.cpp', 'decklink_util.cpp', 'decklink_output.cpp', 'memcpy_interleaved.cpp',
- 'decklink/DeckLinkAPIDispatch.cpp']
-decklink_dir = include_directories('decklink')
-nageru_include_dirs += decklink_dir
-
-# CEF input.
-if have_cef
- srcs += ['nageru_cef_app.cpp', 'cef_capture.cpp']