diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fb5248..baeebfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,5 +7,12 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON") +find_package(Protobuf REQUIRED) +#protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS proto/service.proto) +add_library(mnode-proto proto/service.proto) +target_link_libraries(mnode-proto PUBLIC protobuf::libprotobuf) +target_include_directories(mnode-proto PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +protobuf_generate(TARGET mnode-proto) + add_subdirectory(external) add_subdirectory(src) diff --git a/proto/service.proto b/proto/service.proto new file mode 100644 index 0000000..0044b69 --- /dev/null +++ b/proto/service.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package mesytec.mnode; + +message SearchRequest { + string query = 1; + int32 page_number = 2; + int32 results_per_page = 3; +} + +message Ping { +} + +message Pong { +}