Stability-AI / api-interfaces

Interface definitions for API interactions between components
140 stars 78 forks source link

CMake can't find target gRPC #53

Open heartlocket opened 1 year ago

heartlocket commented 1 year ago

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.

reck753 commented 1 year ago

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