File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ compile_commands.json
55libsimple. *
66build /
77build-ios /
8+ build-ohos /
89* .gch
910bin /
1011output /
@@ -20,4 +21,4 @@ examples/go/libsimple-osx-x64/
2021cmake-build-debug /
2122
2223
23- .vscode /
24+ .vscode /
Original file line number Diff line number Diff line change @@ -83,6 +83,19 @@ make install
8383./build-ios.sh
8484```
8585
86+ 支持 ohos 编译:
87+
88+ 从 [ 官方发布渠道] ( https://gitcode.com/openharmony/docs/blob/master/en/release-notes/OpenHarmony-v5.0.1-release.md#acquiring-source-code-from-mirrors ) 下载适用于目标平台的SDK.
89+ ```
90+ tar -zxvf ohos-sdk.tar.gz
91+ cd $OHOS_SDK/Linux
92+ for i in *.zip;do unzip ${i};done
93+ ```
94+ 开始编译
95+ ```
96+ ./build-ohos.sh
97+ ```
98+
8699### 代码
87100- ` src/entry ` 入口文件,注册 sqlite tokenizer 和函数
88101- ` src/simple_tokenizer ` 分词器实现
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ current_dir=$( pwd) /$( dirname " $0 " )
4+ build_dir=" ${current_dir} /build-ohos"
5+ lib_prefix=" ${current_dir} /output"
6+ CMAKE=" ${OHOS_SDK} /native/build-tools/cmake/bin/cmake"
7+ TOOLCHAIN_FILE=" ${OHOS_SDK} /native/build/cmake/ohos.toolchain.cmake"
8+ OHOS_ARCH=" arm64-v8a"
9+
10+ mkdir -p " $build_dir " && cd " $build_dir " || exit
11+
12+ " $CMAKE " \
13+ -DCMAKE_TOOLCHAIN_FILE=" $TOOLCHAIN_FILE " \
14+ -DCMAKE_INSTALL_PREFIX=" $lib_prefix " \
15+ -DOHOS_ARCH=" $OHOS_ARCH " \
16+ -DCMAKE_CXX_FLAGS=" -Wno-unused-command-line-argument" \
17+ -DCMAKE_C_FLAGS=" -Wno-unused-command-line-argument" \
18+ " $current_dir "
19+
20+ make
21+ make install
You can’t perform that action at this time.
0 commit comments