]> git.sesse.net Git - nageru/blob - shared/meson.build
Change Futatabi frames to be cached as textures instead of in system memory.
[nageru] / shared / meson.build
1 qt5 = import('qt5')
2 shared_qt5deps = dependency('qt5', modules: ['Core', 'Gui', 'Widgets', 'OpenGL'])
3 libmicrohttpddep = dependency('libmicrohttpd')
4 protobufdep = dependency('protobuf')
5 alsadep = dependency('alsa')
6 movitdep = dependency('movit')
7
8 # Preprocess Qt as needed.
9 qt_files = qt5.preprocess(
10         moc_headers: ['aboutdialog.h', 'controller_spin_box.h'],
11         ui_files: ['aboutdialog.ui'],
12         dependencies: shared_qt5deps)
13
14 # Protobuf compilation.
15 gen = generator(protoc, \
16         output    : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'],
17         arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@'])
18 proto_generated = gen.process(['midi_mapping.proto'])
19 protobuf_lib = static_library('protobufs', proto_generated, dependencies: [protobufdep])
20 protobuf_hdrs = declare_dependency(sources: proto_generated)
21
22 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']
23 srcs += proto_generated
24
25 # Qt objects.
26 srcs += qt_files
27 srcs += ['aboutdialog.cpp']
28
29 shared = static_library('shared', srcs, include_directories: top_include, dependencies: [shared_qt5deps, libmicrohttpddep, protobufdep, alsadep, movitdep])
30 shareddep = declare_dependency(
31    sources: proto_generated,
32    include_directories: top_include,
33    link_with: [shared, protobuf_lib])
34
35 bin2h = executable('bin2h', 'bin2h.cpp', native: true)
36 bin2h_gen = generator(bin2h, \
37   output    : ['@PLAINNAME@.cpp'],
38   arguments : ['@INPUT@', '@PLAINNAME@', '@OUTPUT@'])