protoc = find_program('protoc')
cxx = meson.get_compiler('cpp')
+# Use lld if we can; it links a lot faster than ld.bfd or gold.
+nageru_link_args = []
+code = '''#include <stdio.h>
+int main() { printf("Hello, world!\n"); return 0; }
+'''
+if cxx.links(code, args: '-fuse-ld=lld', name: 'check for LLD')
+ nageru_link_args += '-fuse-ld=lld'
+endif
+
embedded_bmusb = get_option('embedded_bmusb')
alsadep = dependency('alsa')
qcustomplotdep, threaddep]
nageru_include_dirs = []
nageru_link_with = []
-nageru_link_args = []
nageru_build_rpath = ''
nageru_install_rpath = ''
# 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']
+ 'disk_space_estimator.cpp', 'timecode_renderer.cpp', 'tweaked_inputs.cpp', 'mjpeg_encoder.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',
dependencies: [nageru_deps, kaeru_extra_deps],
include_directories: nageru_include_dirs,
link_with: [stream, aux, kaeru_link_with],
+ link_args: nageru_link_args,
install: true)
# Audio mixer microbenchmark.
-executable('benchmark_audio_mixer', 'benchmark_audio_mixer.cpp', dependencies: nageru_deps, include_directories: nageru_include_dirs, link_with: [audio, aux])
+executable('benchmark_audio_mixer', 'benchmark_audio_mixer.cpp', dependencies: nageru_deps, include_directories: nageru_include_dirs, link_args: nageru_link_args, link_with: [audio, aux])
# These are needed for a default run.
data_files = ['theme.lua', 'simple.lua', 'bg.jpeg', 'akai_midimix.midimapping']