From f0620a37a5b417c4a35f18652432bfe2d14eeb3e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 30 Nov 2017 17:45:11 +0100 Subject: fix linux distrib tests --- examples/cpp/helloworld/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'examples/cpp') diff --git a/examples/cpp/helloworld/CMakeLists.txt b/examples/cpp/helloworld/CMakeLists.txt index a1869d21bb..49684a13b0 100644 --- a/examples/cpp/helloworld/CMakeLists.txt +++ b/examples/cpp/helloworld/CMakeLists.txt @@ -13,19 +13,20 @@ endif() # Protobuf # NOTE: we cannot use "CONFIG" mode here because protobuf-config.cmake # is broken when used with CMAKE_INSTALL_PREFIX -find_package(protobuf REQUIRED) +find_package(Protobuf REQUIRED) message(STATUS "Using protobuf ${protobuf_VERSION}") if(Protobuf_FOUND) # Protobuf_FOUND is set for package type "CONFIG" set(_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf) set(_PROTOBUF_PROTOC protobuf::protoc) -endif() -if(PROTOBUF_FOUND) +elseif(PROTOBUF_FOUND) # PROTOBUF_FOUND is set for package type "MODULE" set(_PROTOBUF_LIBPROTOBUF ${PROTOBUF_LIBRARIES}) set(_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE}) include_directories(${PROTOBUF_INCLUDE_DIRS}) +else() + message(WARNING "Failed to locate libprotobuf and protoc!") endif() # gRPC -- cgit v1.2.3