Issue resolving ProtobufConfig.cmake

91 views
Skip to first unread message

Chris Jarvis

unread,
Mar 11, 2025, 4:13:12 PMMar 11
to grpc.io
Hello,
I have been hung up on this for a couple days now. I have tried going through numerous tutorials to find myself back to the same issue. Bellow is the error I am running into and one of the resources I was looking at. I have ran into the same issue using it from source.

resource

CMake Error at <user_desktop>/testGRPC/grpc/examples/cpp/cmake/common.cmake:100 (find_package):
  Could not find a package configuration file provided by "Protobuf" with any
  of the following names:

    ProtobufConfig.cmake
    protobuf-config.cmake

  Add the installation prefix of "Protobuf" to CMAKE_PREFIX_PATH or set
  "Protobuf_DIR" to a directory containing one of the above files.  If
  "Protobuf" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:24 (include).

After looking further into it and searching for "Protobuf_DIR" it looks like even with this set its in the directory of the "CMAKE_BINARY_DIR" due to this line. What am I missing or doing incorrectly?

add_examples_build(examples "-Dprotobuf_DIR:PATH=${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}")

I really appreciate all the help.

Kindly,
Jarvis
Reply all
Reply to author
Forward
0 new messages