diff --git a/examples/cpp/helloworld/CMakeLists.txt b/examples/cpp/helloworld/CMakeLists.txt index f158a75bd78..a5e2d9bb27c 100644 --- a/examples/cpp/helloworld/CMakeLists.txt +++ b/examples/cpp/helloworld/CMakeLists.txt @@ -60,7 +60,7 @@ if(GRPC_AS_SUBMODULE) else() set(_PROTOBUF_PROTOC $) endif() - set(_GRPC_GRPCPP_UNSECURE grpc++_unsecure) + set(_GRPC_GRPCPP grpc++) if(CMAKE_CROSSCOMPILING) find_program(_GRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin) else() @@ -87,7 +87,7 @@ elseif(GRPC_FETCHCONTENT) set(_PROTOBUF_LIBPROTOBUF libprotobuf) set(_REFLECTION grpc++_reflection) set(_PROTOBUF_PROTOC $) - set(_GRPC_GRPCPP_UNSECURE grpc++_unsecure) + set(_GRPC_GRPCPP grpc++) if(CMAKE_CROSSCOMPILING) find_program(_GRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin) else() @@ -116,7 +116,7 @@ else() find_package(gRPC CONFIG REQUIRED) message(STATUS "Using gRPC ${gRPC_VERSION}") - set(_GRPC_GRPCPP_UNSECURE gRPC::grpc++_unsecure) + set(_GRPC_GRPCPP gRPC::grpc++) if(CMAKE_CROSSCOMPILING) find_program(_GRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin) else() @@ -155,6 +155,6 @@ foreach(_target ${hw_grpc_srcs}) target_link_libraries(${_target} ${_REFLECTION} - ${_GRPC_GRPCPP_UNSECURE} + ${_GRPC_GRPCPP} ${_PROTOBUF_LIBPROTOBUF}) endforeach()