mirror of
https://github.com/typesense/typesense.git
synced 2025-05-18 04:32:38 +08:00
Fix for sentencepiece build with Bazel
This commit is contained in:
parent
fb8c507e18
commit
b486ee8cd3
3
BUILD
3
BUILD
@ -53,7 +53,8 @@ cc_library(
|
||||
"@s2geometry",
|
||||
"@hnsw",
|
||||
# "@zip",
|
||||
"@sentencepiece"
|
||||
"@sentencepiece",
|
||||
"@sentencepiece//:sentencepiece_headers"
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -9,6 +9,13 @@ filegroup(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "sentencepiece_headers",
|
||||
hdrs = glob(["src/**/*.h"]),
|
||||
includes = ["src"],
|
||||
visibility = ["//visibility:public"],
|
||||
strip_include_prefix = "src"
|
||||
)
|
||||
|
||||
|
||||
cmake(
|
||||
@ -23,7 +30,15 @@ cmake(
|
||||
install = False,
|
||||
cache_entries = {
|
||||
'SPM_USE_BUILTIN_PROTOBUF': 'OFF',
|
||||
'Protobuf_LIBRARY': '$EXT_BUILD_ROOT/bazel-out/k8-fastbuild/bin/external/com_google_protobuf/',
|
||||
'Protobuf_LITE_LIBRARY': '$EXT_BUILD_ROOT/bazel-out/k8-fastbuild/bin/external/com_google_protobuf/',
|
||||
'Protobuf_INCLUDE_DIR': '$EXT_BUILD_ROOT/external/com_google_protobuf/src',
|
||||
},
|
||||
deps = [
|
||||
"@com_google_protobuf//:protobuf_lite",
|
||||
"@com_google_protobuf//:protobuf",
|
||||
"@com_google_protobuf//:protobuf_headers",
|
||||
],
|
||||
postfix_script= """
|
||||
echo "Intstalling sentencepiece"
|
||||
cp $BUILD_TMPDIR/src/libsentencepiece.a $INSTALLDIR/lib/libsentencepiece.a
|
||||
|
Loading…
x
Reference in New Issue
Block a user