Skip to content

Commit 823689c

Browse files
committed
add protoc to cmake
1 parent bdee5bd commit 823689c

File tree

4 files changed

+3
-9313
lines changed

4 files changed

+3
-9313
lines changed

modules/graph/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ file(GLOB_RECURSE VINEYARD_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}"
99

1010
find_package(MPI REQUIRED)
1111
find_package(libgrapelite REQUIRED)
12+
1213
find_package(Protobuf REQUIRED)
1314
include_directories(${Protobuf_INCLUDE_DIRS})
1415
include_directories(${CMAKE_CURRENT_BINARY_DIR})
16+
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${CMAKE_CURRENT_SOURCE_DIR}/grin/include/proto/graph.proto)
1517

1618

1719
if(VINEYARD_MOD_SRCS)
@@ -179,7 +181,7 @@ endif()
179181

180182
# grin lib
181183
file(GLOB_RECURSE GRIN_SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}" "grin/*.cc")
182-
add_library(vineyard_grin ${GRIN_SRC_FILES})
184+
add_library(vineyard_grin ${GRIN_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS})
183185
target_link_libraries(vineyard_grin PRIVATE vineyard_graph ${Protobuf_LIBRARIES})
184186
install_vineyard_target(vineyard_grin)
185187

0 commit comments

Comments
 (0)