mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Add flatc
This commit is contained in:
parent
40e472fd7f
commit
6f95dad40a
@ -45,6 +45,12 @@ http_file(
|
||||
sha256 = "89a287444b5b3e98f88a945afa50ce937b8ffd1dcc59c555ad9b1baf855298c9",
|
||||
)
|
||||
|
||||
http_file(
|
||||
name = "flatbuffers_zip",
|
||||
urls = ["https://github.com/google/flatbuffers/archive/refs/tags/v24.12.23.zip"],
|
||||
sha256 = "c5cd6a605ff20350c7faa19d8eeb599df6117ea4aabd16ac58a7eb5ba82df4e7",
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "appcenter_sdk",
|
||||
urls = ["https://github.com/microsoft/appcenter-sdk-apple/releases/download/4.1.1/AppCenter-SDK-Apple-4.1.1.zip"],
|
||||
|
37
third-party/flatc/BUILD
vendored
Normal file
37
third-party/flatc/BUILD
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
genrule(
|
||||
name = "flatc",
|
||||
srcs = [
|
||||
"@flatbuffers_zip//file",
|
||||
"@cmake_tar_gz//file",
|
||||
],
|
||||
cmd_bash =
|
||||
"""
|
||||
set -x
|
||||
core_count=`PATH="$$PATH:/usr/sbin" sysctl -n hw.logicalcpu`
|
||||
BUILD_DIR="$(RULEDIR)/build"
|
||||
rm -rf "$$BUILD_DIR"
|
||||
mkdir -p "$$BUILD_DIR"
|
||||
|
||||
CMAKE_DIR="$$(pwd)/$$BUILD_DIR/cmake"
|
||||
rm -rf "$$CMAKE_DIR"
|
||||
mkdir -p "$$CMAKE_DIR"
|
||||
tar -xf "$(location @cmake_tar_gz//file)" -C "$$CMAKE_DIR"
|
||||
|
||||
tar -xzf "$(location @flatbuffers_zip//file)" --directory "$$BUILD_DIR"
|
||||
pushd "$$BUILD_DIR/flatbuffers-24.12.23"
|
||||
mkdir build
|
||||
cd build
|
||||
PATH="$$PATH:$$CMAKE_DIR/cmake-3.23.1-macos-universal/CMake.app/Contents/bin" cmake .. -DCMAKE_BUILD_TYPE=Release"
|
||||
make -j $$core_count
|
||||
popd
|
||||
|
||||
tar -cf "$(location flatc.tar)" -C "$$BUILD_DIR/flatbuffers-24.12.23/build" .
|
||||
""",
|
||||
outs = [
|
||||
"flatc.tar",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
]
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user