Skip to content

Commit

Permalink
删除部分无意义代码
Browse files Browse the repository at this point in the history
  • Loading branch information
171930433 committed Mar 20, 2024
1 parent 16209df commit 867b81e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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(Protobuf_IMPORT_DIRS ${CMAKE_SOURCE_DIR} ${struct_pb_plugin_DIRS} ${CMAKE_CURRENT_LIST_DIR}) # 设置protoc --proto_path参数
set(Protobuf_IMPORT_DIRS ${struct_pb_plugin_DIRS} ${CMAKE_CURRENT_LIST_DIR}) # 设置protoc --proto_path参数
include(${struct_pb_plugin_DIRS}/cmake/struct_pb.cmake)

find_package(PCL REQUIRED COMPONENTS common io)
Expand All @@ -31,7 +31,6 @@ protobuf_generate_python(PROTO_PYTHON_SRCS
protobuf_generate_struct_pb(PROTO_STRUCT_SRCS PROTO_STRUCT_HDRS
${PROTO_FILES}
OPTION "namespace=zhito.inner_struct,converter_namespace=zhito.converter"
# PROTOC_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}
)


Expand Down
7 changes: 1 addition & 6 deletions src/example/message/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@ file(GLOB PROTO_FILES "*.proto")
# generate .pb.cc .pb.h
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS
${PROTO_FILES}
# IMPORT_DIRS ${CMAKE_SOURCE_DIR}
)

protobuf_generate_python(PROTO_PYTHON_SRCS
${PROTO_FILES}
# IMPORT_DIRS ${CMAKE_SOURCE_DIR}
)

# 删除点云,图片proto记录文件
list(FILTER PROTO_FILES EXCLUDE REGEX "pointcloud\\.proto$|image\\.proto$")
# message(status "-------${PROTO_FILES}-------")


protobuf_generate_struct_pb(PROTO_STRUCT_SRCS PROTO_STRUCT_HDRS
${PROTO_FILES}
OPTION "namespace=zhito.inner_struct,converter_namespace=zhito.converter"
# PROTOC_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}
)

add_library($ENV{proto_message} OBJECT
Expand All @@ -30,7 +25,7 @@ add_library($ENV{proto_message} OBJECT
${PROTO_HDRS}
${PROTO_STRUCT_SRCS}
${PROTO_STRUCT_HDRS}
# ${PROTO_PYTHON_SRCS}
${PROTO_PYTHON_SRCS}
)

target_link_libraries($ENV{proto_message} protobuf::libprotobuf
Expand Down

0 comments on commit 867b81e

Please sign in to comment.