Skip to content

Commit

Permalink
adapt grpc build steps for newer ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
npoltorapavlo committed Oct 15, 2024
1 parent 5d4a819 commit 29f9504
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CloudStore/grpc/l0test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ add_custom_target(protoc
)
add_dependencies(${PROJECT_NAME} protoc)

target_link_libraries(${PROJECT_NAME} PRIVATE grpc++)
find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin REQUIRED)
find_package(gRPC CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE gRPC::grpc++)
set(GRPC_CPP_PLUGIN $<TARGET_FILE:gRPC::grpc_cpp_plugin>)

add_custom_target(protoc-gen-grpc
${Protobuf_PROTOC_EXECUTABLE} --grpc_out ${CMAKE_CURRENT_BINARY_DIR} --plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN} -I ${CMAKE_CURRENT_SOURCE_DIR}/../secure_storage ${CMAKE_CURRENT_SOURCE_DIR}/../secure_storage/secure_storage.proto
Expand Down
5 changes: 3 additions & 2 deletions CloudStore/grpc/l2test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ add_custom_target(protoc
)
add_dependencies(${PROJECT_NAME} protoc)

target_link_libraries(${PROJECT_NAME} PRIVATE grpc++)
find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin REQUIRED)
find_package(gRPC CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE gRPC::grpc++)
set(GRPC_CPP_PLUGIN $<TARGET_FILE:gRPC::grpc_cpp_plugin>)

add_custom_target(protoc-gen-grpc
${Protobuf_PROTOC_EXECUTABLE} --grpc_out ${CMAKE_CURRENT_BINARY_DIR} --plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN} -I ${CMAKE_CURRENT_SOURCE_DIR}/../secure_storage ${CMAKE_CURRENT_SOURCE_DIR}/../secure_storage/secure_storage.proto
Expand Down

0 comments on commit 29f9504

Please sign in to comment.