Skip to content

Commit

Permalink
Install RE2 and absl from grpc third party (#452)
Browse files Browse the repository at this point in the history
* Fix RE2 for client library builds

* Fix library installation

* Add re2
  • Loading branch information
Tabrizian authored Jan 3, 2024
1 parent b09488d commit c21fe5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ endif()

if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER OR TRITON_ENABLE_PERF_ANALYZER_C_API)

set(_cc_client_depends "")
set(_cc_client_depends re2)
if(${TRITON_ENABLE_CC_HTTP})
set(_cc_client_depends ${_cc_client_depends} curl)
endif() # TRITON_ENABLE_CC_HTTP
Expand Down Expand Up @@ -152,6 +152,7 @@ if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER
-DProtobuf_DIR:PATH=${_FINDPACKAGE_PROTOBUF_CONFIG_DIR}
-DgRPC_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/grpc/lib/cmake/grpc
-Dabsl_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/absl/${LIB_DIR}/cmake/absl
-Dre2_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/re2/${LIB_DIR}/cmake/re2
-Dc-ares_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/c-ares/${LIB_DIR}/cmake/c-ares
-DGTEST_ROOT:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/googletest
-DTRITON_COMMON_REPO_TAG:STRING=${TRITON_COMMON_REPO_TAG}
Expand All @@ -174,7 +175,7 @@ if(TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER
endif() # TRITON_ENABLE_CC_HTTP OR TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER

if(TRITON_ENABLE_PYTHON_HTTP OR TRITON_ENABLE_PYTHON_GRPC)
set(_py_client_depends "")
set(_py_client_depends re2)
if(${TRITON_ENABLE_PYTHON_GRPC})
set(_py_client_depends ${_py_client_depends} grpc protobuf)
endif() # TRITON_ENABLE_PYTHON_GRPC
Expand All @@ -194,6 +195,7 @@ if(TRITON_ENABLE_PYTHON_HTTP OR TRITON_ENABLE_PYTHON_GRPC)
-DgRPC_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/grpc/lib/cmake/grpc
-Dabsl_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/absl/${LIB_DIR}/cmake/absl
-Dc-ares_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/c-ares/${LIB_DIR}/cmake/c-ares
-Dre2_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/re2/${LIB_DIR}/cmake/re2
-DTRITON_COMMON_REPO_TAG:STRING=${TRITON_COMMON_REPO_TAG}
-DTRITON_CORE_REPO_TAG:STRING=${TRITON_CORE_REPO_TAG}
-DTRITON_VERSION:STRING=${TRITON_VERSION}
Expand Down
6 changes: 6 additions & 0 deletions src/c++/library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ if(TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER)
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/grpc/lib/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/protobuf/lib/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/c-ares/lib/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/absl/lib/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/re2/lib/
DESTINATION ${CMAKE_INSTALL_LIBDIR}
FILES_MATCHING
PATTERN "*\.a"
Expand All @@ -219,6 +221,8 @@ if(TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER)
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/grpc/lib/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/protobuf/lib/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/c-ares/lib/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/absl/lib/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/re2/lib/
DESTINATION ${CMAKE_INSTALL_LIBDIR}
FILES_MATCHING
PATTERN "*\.lib"
Expand All @@ -233,7 +237,9 @@ if(TRITON_ENABLE_CC_GRPC OR TRITON_ENABLE_PERF_ANALYZER)
install(
DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/grpc/include/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/absl/include/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/protobuf/include/
${CMAKE_CURRENT_BINARY_DIR}/../../third-party/re2/include/
DESTINATION include
)
endif()
Expand Down

0 comments on commit c21fe5a

Please sign in to comment.