Make GPRC and protobuf external components to RDC

Pass in GRPC root (or use default location) for RDC to use
when building RDC components.

Change-Id: I89db2ac2be27ab6449c817d210a94c11fef965fd
This commit is contained in:
Chris Freehill
2020-04-20 12:24:33 -05:00
parent fe3e75edfa
commit 1b58033183
7 changed files with 33 additions and 11 deletions
+3
View File
@@ -53,6 +53,7 @@ message("--------Proj Lib Dir: " ${PROJECT_BINARY_DIR}/lib)
message("--------Proj Exe Dir: " ${PROJECT_BINARY_DIR}/bin)
message("--------RSMI Lib Dir: " ${RSMI_LIB_DIR})
message("--------RSMI Inc Dir: " ${RSMI_INC_DIR})
message("-------GRPC Root Dir: " ${GRPC_ROOT})
message("")
## Set default module path if not already set
@@ -135,6 +136,7 @@ set(CLIENT_LIB_INC_LIST ${CLIENT_LIB_INC_LIST}
set(CLIENT_LIB_INC_LIST ${CLIENT_LIB_INC_LIST}
"${PROJECT_SOURCE_DIR}/common/rdc_utils.h")
link_directories(${GRPC_ROOT}/lib)
add_library(${CLIENT_LIB} SHARED ${CLIENT_LIB_SRC_LIST} ${CLIENT_LIB_INC_LIST})
target_link_libraries(${CLIENT_LIB} pthread rt grpc grpc++ grpc++_reflection
dl protobuf)
@@ -143,6 +145,7 @@ target_include_directories(${CLIENT_LIB} PRIVATE
"${PROJECT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${PROTOB_OUT_DIR}"
"${GRPC_ROOT}/include"
"${RSMI_INC_DIR}")
# TODO: set the properties for the library once we have one
## Set the VERSION and SOVERSION values