Installing gRPC cmake does not create targets file
I am trying to build and install gRPC with cmake. Building the project went relatively smoothly with ninjas after some confusion around purchasing nuget packages and updating git submodules.
I am having problems installing gRPC. After reading the cmake file, I found that you need to manually set the cache variable gRPC_INSTALL
to ON
so that cmake can create the install target. After that I can call the install target and the libraries and cmake headers and config files are installed. But the cmake targets file is missing and it is not even generated. The config file is simple, all it does is call the targets file:
include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake)
But it doesn't seem like the CMakeLists file in gRPC is even trying to generate this file, unless I'm missing something? You cannot even create a sample cpp project in the gRPC repository using cmake, because when it tries to find the gRPC package, the config file cannot find gRPCTargets.cmake. So what is the correct way to build, install and link to gRPC using cmake? I'm on Windows, but it doesn't matter with cmake.
source to share
No one has answered this question yet
Check out similar questions: