Skip to content

Commit

Permalink
protoc-plugin修改成protoc_plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
171930433 committed Mar 27, 2024
1 parent 52889f9 commit 844e1b2
Show file tree
Hide file tree
Showing 43 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ project(yaLanTingLibs

# set(SYSROOT_DIR /opt/zhito/sysroot)
if(NOT CMAKE_PREFIX_PATH)
set(CMAKE_PREFIX_PATH "/home/gsk/pro/CyberRT/install")
# set(CMAKE_PREFIX_PATH "/home/gsk/pro/ubuntu2204_docker/install")
# set(CMAKE_PREFIX_PATH "/home/gsk/pro/CyberRT/install")
set(CMAKE_PREFIX_PATH "/home/gsk/pro/ubuntu2204_docker/install")
endif()

find_package(protobuf REQUIRED)

add_subdirectory(src/protoc-plugin)
add_subdirectory(src/protoc_plugin)

option(BUILD_EXAMPLES OFF)

Expand Down
2 changes: 1 addition & 1 deletion src/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_compile_options(-Wno-attributes)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/examples)

# protobuf_generate_struct_pb 函数
set(struct_pb_plugin_DIRS ${CMAKE_SOURCE_DIR}/src/protoc-plugin) # struct_pb_plugin_DIRS 将指定 proto_to_struct.proto,struct_pb.cmake等目录
set(struct_pb_plugin_DIRS ${CMAKE_SOURCE_DIR}/src/protoc_plugin) # struct_pb_plugin_DIRS 将指定 proto_to_struct.proto,struct_pb.cmake等目录
include(${struct_pb_plugin_DIRS}/cmake/struct_pb.cmake)

find_package(PCL REQUIRED COMPONENTS common io)
Expand Down
2 changes: 1 addition & 1 deletion src/example/base.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package zhito.inner_class;

import "src/protoc-plugin/proto_to_struct.proto";
import "src/protoc_plugin/proto_to_struct.proto";
option(write_eigen_helper) = true;

message Vector4f
Expand Down
2 changes: 1 addition & 1 deletion src/example/message/chasis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package zhito.inner_class;

import "src/example/message/zframe.proto";
import "src/example/base.proto";
import "src/protoc-plugin/proto_to_struct.proto";
import "src/protoc_plugin/proto_to_struct.proto";
message ZChassis
{
ZFrame header = 1 [(inherits_from) = true];
Expand Down
2 changes: 1 addition & 1 deletion src/example/message/gnss.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package zhito.inner_class;

import "src/example/message/zframe.proto";
import "src/example/base.proto";
import "src/protoc-plugin/proto_to_struct.proto";
import "src/protoc_plugin/proto_to_struct.proto";
message ZGnss
{
ZFrame header = 1 [(inherits_from) = true];;
Expand Down
2 changes: 1 addition & 1 deletion src/example/message/imu.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package zhito.inner_class;

import "src/example/message/zframe.proto";
import "src/example/base.proto";
import "src/protoc-plugin/proto_to_struct.proto";
import "src/protoc_plugin/proto_to_struct.proto";
message ZImu
{
ZFrame header = 1 [(inherits_from) = true];
Expand Down
2 changes: 1 addition & 1 deletion src/example/message/perception.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package zhito.inner_class;

import "src/example/message/zframe.proto";
import "src/example/base.proto";
import "src/protoc-plugin/proto_to_struct.proto";
import "src/protoc_plugin/proto_to_struct.proto";
message ZPercBase
{
int32 track_id = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/example/message/pointcloud.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package zhito.inner_class;

import "src/example/message/zframe.proto";
// import "src/example/base.proto";
// import "src/protoc-plugin/proto_to_struct.proto";
// import "src/protoc_plugin/proto_to_struct.proto";
message ZPointCloudXYZIT
{
ZFrame header = 1 ;
Expand Down
2 changes: 1 addition & 1 deletion src/example/message/state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package zhito.inner_class;

import "src/example/message/zframe.proto";
import "src/example/base.proto";
import "src/protoc-plugin/proto_to_struct.proto";
import "src/protoc_plugin/proto_to_struct.proto";
message ZState{
ZFrame header = 1 [(inherits_from) = true];
Vector3d pos = 2;//位置: X Y Z
Expand Down
2 changes: 1 addition & 1 deletion src/example/message/zframe.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";
package zhito.inner_class;

// import "src/example/base.proto";
// import "src/protoc-plugin/proto_to_struct.proto";
// import "src/protoc_plugin/proto_to_struct.proto";
enum ZFrameType{
None = 0;
VEHICLE_MODEL = 1; // 车辆运动约束虚拟帧
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "google/protobuf/descriptor.h"

// added
#include "src/protoc-plugin/proto_to_struct.pb.h"
#include "src/protoc_plugin/proto_to_struct.pb.h"

struct Options {
Options(const google::protobuf::FileDescriptor* f) : f(f) {}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 844e1b2

Please sign in to comment.