2 shared_qt5deps = dependency('qt5', modules: ['Core', 'Gui', 'Widgets', 'OpenGL'])
3 libavcodecdep = dependency('libavcodec')
4 libavformatdep = dependency('libavformat')
5 libavutildep = dependency('libavutil')
6 libmicrohttpddep = dependency('libmicrohttpd')
7 protobufdep = dependency('protobuf')
8 alsadep = dependency('alsa')
9 movitdep = dependency('movit')
10 vadrmdep = dependency('libva-drm')
11 vax11dep = dependency('libva-x11')
13 # Preprocess Qt as needed.
14 qt_files = qt5.preprocess(
15 moc_headers: ['aboutdialog.h', 'controller_spin_box.h'],
16 ui_files: ['aboutdialog.ui'],
17 dependencies: shared_qt5deps)
19 # Protobuf compilation.
20 gen = generator(protoc, \
21 output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'],
22 arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@'])
23 proto_generated = gen.process(['midi_mapping.proto'])
24 protobuf_lib = static_library('protobufs', proto_generated, dependencies: [protobufdep])
25 protobuf_hdrs = declare_dependency(sources: proto_generated)
27 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', 'ref_counted_texture.cpp', 'va_display.cpp', 'va_resource_pool.cpp']
28 srcs += proto_generated
32 srcs += ['aboutdialog.cpp']
34 shared = static_library('shared', srcs, include_directories: top_include, dependencies: [shared_qt5deps, libavcodecdep, libavformatdep, libavutildep, libmicrohttpddep, protobufdep, alsadep, movitdep, vadrmdep, vax11dep])
35 shareddep = declare_dependency(
36 sources: proto_generated,
37 include_directories: top_include,
38 link_with: [shared, protobuf_lib])
40 bin2h = executable('bin2h', 'bin2h.cpp', native: true)
41 bin2h_gen = generator(bin2h, \
42 output : ['@PLAINNAME@.cpp'],
43 arguments : ['@INPUT@', '@PLAINNAME@', '@OUTPUT@'])