2 shared_qt5deps = dependency('qt5', modules: ['Core', 'Gui', 'Widgets', 'OpenGL'])
3 libmicrohttpddep = dependency('libmicrohttpd')
4 protobufdep = dependency('protobuf')
5 alsadep = dependency('alsa')
7 # Preprocess Qt as needed.
8 qt_files = qt5.preprocess(
9 moc_headers: ['aboutdialog.h', 'controller_spin_box.h'],
10 ui_files: ['aboutdialog.ui'],
11 dependencies: shared_qt5deps)
13 # Protobuf compilation.
14 gen = generator(protoc, \
15 output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'],
16 arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@'])
17 proto_generated = gen.process(['midi_mapping.proto'])
18 protobuf_lib = static_library('protobufs', proto_generated, dependencies: [protobufdep])
19 protobuf_hdrs = declare_dependency(sources: proto_generated)
21 srcs = ['memcpy_interleaved.cpp', 'metacube2.cpp', 'ffmpeg_raii.cpp', 'mux.cpp', 'metrics.cpp', 'context.cpp', 'httpd.cpp', 'disk_space_estimator.cpp', 'read_file.cpp', 'text_proto.cpp', 'midi_device.cpp']
22 srcs += proto_generated
26 srcs += ['aboutdialog.cpp']
28 shared = static_library('shared', srcs, include_directories: top_include, dependencies: [shared_qt5deps, libmicrohttpddep, protobufdep, alsadep])
29 shareddep = declare_dependency(
30 sources: proto_generated,
31 include_directories: top_include,
32 link_with: [shared, protobuf_lib])
34 bin2h = executable('bin2h', 'bin2h.cpp', native: true)
35 bin2h_gen = generator(bin2h, \
36 output : ['@PLAINNAME@.cpp'],
37 arguments : ['@INPUT@', '@PLAINNAME@', '@OUTPUT@'])