api-interfaces icon indicating copy to clipboard operation
api-interfaces copied to clipboard

CMake can't find target gRPC

Open heartlocket opened this issue 2 years ago • 1 comments
trafficstars

I am new to using CMake and gRPC so please bear with me, but I am encountering an issue when I try to compile:

CMake Error at /Users/adampease/Downloads/api-interfaces/CMakeFiles/CMakeTmp/CMakeLists.txt:22 (target_link_libraries):
  Target "cmTC_9bcdd" links to:

    gRPC::grpc++

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at src/cmake/FindgRPC.cmake:320 (try_run):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:17 (include)

Installed grpc globally with npm, so it should be available, but I am not sure why it is struggling to find it.

heartlocket avatar Dec 13 '22 04:12 heartlocket

For MacOS, I managed to resolve the same issue by installing grpc with homebrew instead.

reck753 avatar Jan 17 '23 23:01 reck753