X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=shared%2Fmeson.build;fp=shared%2Fmeson.build;h=082e4f515ed305f771a1c9dec406ef6482870400;hb=09b27ab32073dba2c565cdda43fcf2c37ea04a7b;hp=90711c02f1f17a8043e2be55fbcab61479894951;hpb=a07c2ed551f4d92eda6c508b04748af7ce0d4bda;p=nageru diff --git a/shared/meson.build b/shared/meson.build index 90711c0..082e4f5 100644 --- a/shared/meson.build +++ b/shared/meson.build @@ -10,7 +10,16 @@ qt_files = qt5.preprocess( ui_files: ['aboutdialog.ui'], dependencies: shared_qt5deps) +# 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(['midi_mapping.proto']) +protobuf_lib = static_library('protobufs', proto_generated, dependencies: [protobufdep]) +protobuf_hdrs = declare_dependency(sources: proto_generated) + 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'] +srcs += proto_generated # Qt objects. srcs += qt_files @@ -18,8 +27,9 @@ srcs += ['aboutdialog.cpp'] shared = static_library('shared', srcs, include_directories: top_include, dependencies: [shared_qt5deps, libmicrohttpddep, protobufdep, alsadep]) shareddep = declare_dependency( + sources: proto_generated, include_directories: top_include, - link_with: shared) + link_with: [shared, protobuf_lib]) bin2h = executable('bin2h', 'bin2h.cpp') bin2h_gen = generator(bin2h, \