Skip to content

Commit 2b9c613

Browse files
committed
Add flatbuffers
1 parent 0cc5f99 commit 2b9c613

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
mkdir build
2+
cd build
3+
4+
# Configure step
5+
emcmake cmake ${CMAKE_ARGS} .. \
6+
-GNinja \
7+
-DCMAKE_PREFIX_PATH:PATH=${PREFIX} \
8+
-DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} \
9+
-DCMAKE_INSTALL_LIBDIR=lib \
10+
-DCMAKE_BUILD_TYPE=Release \
11+
-DBUILD_SHARED_LIBS=FALSE \
12+
-DFLATBUFFERS_BUILD_TESTS=OFF \
13+
-DFLATBUFFERS_BUILD_FLATC=ON \
14+
# -DCMAKE_EXE_LINKER_FLAGS="-s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=1 -s STANDALONE_WASM=1" \
15+
16+
# Build step
17+
emmake ninja install
18+
19+
# Copy wasm file also
20+
cp ./flatc.wasm $PREFIX/bin/
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
context:
2+
version: 25.9.23
3+
name: flatbuffers
4+
5+
package:
6+
name: ${{ name }}
7+
version: ${{ version }}
8+
9+
source:
10+
url: https://github.com/google/${{ name }}/archive/refs/tags/v${{ version }}.tar.gz
11+
sha256: 9102253214dea6ae10c2ac966ea1ed2155d22202390b532d1dea64935c518ada
12+
13+
build:
14+
number: 0
15+
16+
requirements:
17+
build:
18+
- ${{ compiler("cxx") }}
19+
- cmake
20+
- ninja
21+
22+
tests:
23+
- package_contents:
24+
files:
25+
- bin/flatc.js
26+
- bin/flatc.wasm
27+
- lib/libflatbuffers.a
28+
- include/flatbuffers/flatbuffers.h
29+
30+
about:
31+
license: Apache-2.0
32+
license_file: LICENSE
33+
summary: 'FlatBuffers: Memory Efficient Serialization Library'
34+
description: |
35+
FlatBuffers is a cross platform serialization library architected for
36+
maximum memory efficiency. It allows you to directly access serialized data
37+
without parsing/unpacking it first, while still having great forwards/
38+
backwards compatibility.
39+
homepage: https://flatbuffers.dev
40+
41+
extra:
42+
recipe-maintainers:
43+
- Alex-PLACET
44+

0 commit comments

Comments
 (0)