# Protobuf compilation.
gen = generator(protoc, \
output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'],
- arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/nageru', '--cpp_out=@BUILD_DIR@', '@INPUT@'])
-proto_generated = gen.process(['nageru/state.proto', 'nageru/midi_mapping.proto', 'nageru/json.proto'])
-protobuf_lib = static_library('protobufs', proto_generated, dependencies: nageru_deps, include_directories: nageru_include_dirs)
+ arguments : ['--proto_path=@CURRENT_SOURCE_DIR@/nageru', '--cpp_out=@BUILD_DIR@', '-I@CURRENT_SOURCE_DIR@/shared', '@INPUT@'])
+proto_generated = gen.process(['nageru/state.proto', 'nageru/json.proto', 'nageru/nageru_midi_mapping.proto'])
+protobuf_lib = static_library('nageru_protobufs', proto_generated, dependencies: nageru_deps, include_directories: nageru_include_dirs)
protobuf_hdrs = declare_dependency(sources: proto_generated)
nageru_link_with += protobuf_lib
#include "input_mapping.h"
#include "input_mapping_dialog.h"
#include "lrameter.h"
-#include "midi_mapping.pb.h"
+#include "nageru_midi_mapping.pb.h"
#include "midi_mapping_dialog.h"
#include "mixer.h"
#include "nonlinear_fader.h"
#include <thread>
#include "audio_mixer.h"
-#include "midi_mapping.pb.h"
+#include "nageru_midi_mapping.pb.h"
#include "shared/midi_mapper_util.h"
#include "shared/text_proto.h"
#include <string>
#include "midi_mapper.h"
-#include "midi_mapping.pb.h"
+#include "nageru_midi_mapping.pb.h"
#include "shared/post_to_main_thread.h"
#include "ui_midi_mapping.h"
syntax = "proto2";
-// A single, given controller mapping.
-message MIDIControllerProto {
- required int32 controller_number = 1;
- // TODO: Add flags like invert here if/when we need them.
-}
-
-message MIDIButtonProto {
- required int32 note_number = 1;
-}
-
-message MIDILightProto {
- required int32 note_number = 1;
-}
+import "midi_mapping.proto";
// All the mappings for a given a bus.
message MIDIMappingBusProto {
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
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, \
--- /dev/null
+// Mappings from MIDI controllers to the UI. (We don't really build
+// a more complicated data structure than this in Nageru itself either;
+// we just edit and match directly against the protobuf.)
+
+syntax = "proto2";
+
+// A single, given controller mapping.
+message MIDIControllerProto {
+ required int32 controller_number = 1;
+ // TODO: Add flags like invert here if/when we need them.
+}
+
+message MIDIButtonProto {
+ required int32 note_number = 1;
+}
+
+message MIDILightProto {
+ required int32 note_number = 1;
+}