From 3e6b74ce6feb220d7425a487299832ec9cdb41e3 Mon Sep 17 00:00:00 2001
From: Joscha Schmiedt <joscha@schmiedt.dev>
Date: Tue, 13 Aug 2024 23:19:45 +0200
Subject: [PATCH] Add linking to grpc++

---
 CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 421e9f3..a49ae48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,7 +169,7 @@ if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
 
     add_library(caosdb_grpc SHARED ${GRPC_GENERATED})
     target_link_libraries(caosdb_grpc 
-        gRPC::grpc protobuf::libprotobuf ${Boost_LIBRARIES}
+        gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
     )
     target_include_directories(caosdb_grpc PUBLIC
         $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>
@@ -180,7 +180,7 @@ if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
    add_library(caosdb SHARED ${libcaosdb_INCL} ${libcaosdb_SRC})
 
    target_link_libraries(caosdb 
-        caosdb_grpc gRPC::grpc protobuf::libprotobuf ${Boost_LIBRARIES}
+        caosdb_grpc gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
     )
 
     set(LIBCAOSDB caosdb caosdb_grpc)
@@ -188,7 +188,7 @@ else()
     add_library(caosdb
         SHARED ${libcaosdb_INCL} ${libcaosdb_SRC} ${GRPC_GENERATED})
      target_link_libraries(caosdb
-        gRPC::grpc protobuf::libprotobuf ${Boost_LIBRARIES}
+        gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
         stdc++fs
     )
      set(LIBCAOSDB caosdb)
@@ -209,7 +209,7 @@ target_include_directories(caosdb PUBLIC
 # ----------
 add_library(ccaosdb SHARED src/ccaosdb.cpp)
 target_link_libraries(ccaosdb
-    gRPC::grpc protobuf::libprotobuf ${Boost_LIBRARIES}
+    gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
     ${LIBCAOSDB}
     stdc++fs
 )
-- 
GitLab