Skip to content

Commit a271c66

Browse files
committed
fix: Pass utf8_range_DIR to triton-core build
The protobuf bundled with gRPC v1.81.1 (v33.5) installs utf8_range as a separate CMake package and protobuf-config.cmake references the utf8_range::utf8_validity imported target. find_package(Protobuf CONFIG) with only Protobuf_DIR set fails at generate time with 'the target was not found'. Provide utf8_range_DIR alongside Protobuf_DIR.
1 parent 2b67858 commit a271c66

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ if(NOT TRITON_CORE_HEADERS_ONLY)
246246

247247
# Location where protobuf-config.cmake will be installed
248248
set(_FINDPACKAGE_PROTOBUF_CONFIG_DIR "${TRITON_THIRD_PARTY_INSTALL_PREFIX}/protobuf/${LIB_DIR}/cmake/protobuf")
249+
set(_FINDPACKAGE_UTF8_RANGE_CONFIG_DIR "${TRITON_THIRD_PARTY_INSTALL_PREFIX}/protobuf/${LIB_DIR}/cmake/utf8_range")
249250

250251
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
251252
set(TRITON_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/install)
@@ -286,6 +287,7 @@ if(NOT TRITON_CORE_HEADERS_ONLY)
286287
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/triton-core"
287288
CMAKE_CACHE_ARGS
288289
-DProtobuf_DIR:PATH=${_FINDPACKAGE_PROTOBUF_CONFIG_DIR}
290+
-Dutf8_range_DIR:PATH=${_FINDPACKAGE_UTF8_RANGE_CONFIG_DIR}
289291
${_CMAKE_ARGS_OPENSSL_ROOT_DIR}
290292
${_CMAKE_ARGS_CMAKE_TOOLCHAIN_FILE}
291293
${_CMAKE_ARGS_VCPKG_TARGET_TRIPLET}

0 commit comments

Comments
 (0)