diff --git a/thirdparty/draco/HPKBUILD b/thirdparty/draco/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..652f25ceafb2f0e371d6e9e9681be769ea43a374 --- /dev/null +++ b/thirdparty/draco/HPKBUILD @@ -0,0 +1,61 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: wangjialun <2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com> , wangying +# Maintainer: wangyihao<2942375747@qq.com> + +pkgname=draco +pkgver=1.5.4 +pkgrel=0 +pkgdesc="Draco is a library for compressing and decompressing 3D geometric meshes and point clouds." +url="https://github.com/google/draco/tree/1.5.4" +archs=("armeabi-v7a" "arm64-v8a") +license=("Apache-2.0 license") +depends=() +makedepends=() +source="https://github.com/google/$pkgname/archive/refs/tags/$pkgver.zip" + +downloadpackage=true +autounpack=true +buildtools="cmake" + +builddir=$pkgname-${pkgver} +packagename=$builddir.zip + +prepare() { + mkdir -p $builddir/$ARCH-build +} + +build() { + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DCMAKE_C_FLAGS="-Wno-unused-command-line-argument" \ + -DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument" -B$ARCH-build -S./ > $buildlog 2>&1 + $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + $MAKE -C $ARCH-build install >> $buildlog 2>&1 + cd $OLDPWD +} + +check() { + echo "The test must be on an OpenHarmony device!" +} + +cleanbuild() { + rm -rf ${PWD}/$builddir +} \ No newline at end of file diff --git a/thirdparty/draco/HPKCHECK b/thirdparty/draco/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..505898747ac90d16cb8febff38876187a3430cbd --- /dev/null +++ b/thirdparty/draco/HPKCHECK @@ -0,0 +1,34 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: wangjialun <2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com> , wangying +# Maintainer: wangyihao<2942375747@qq.com> + +source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +# 测试前的准备, 如果不需要可以不写。 +checkprepare(){ + return 0 +} + +# 在OH环境执行测试的接口 +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} \ No newline at end of file diff --git a/thirdparty/draco/OAT.xml b/thirdparty/draco/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9 --- /dev/null +++ b/thirdparty/draco/OAT.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/draco/README.OpenSource b/thirdparty/draco/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..9d8260e2b8e18352774f92bc0b2f3f7836d4d801 --- /dev/null +++ b/thirdparty/draco/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "draco", + "License": "Apache-2.0 license", + "License File": "https://github.com/google/draco/blob/main/LICENSE", + "Version Number": "v1.5.4", + "Owner": "huangminzhong2@huawei.com", + "Upstream URL": "https://github.com/google/draco", + "Description": "Draco is a library for compressing and decompressing 3D geometric meshes and point clouds." + } +] \ No newline at end of file diff --git a/thirdparty/draco/README_zh.md b/thirdparty/draco/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..8549022299bd71b89e8c3fa787d516db1198455c --- /dev/null +++ b/thirdparty/draco/README_zh.md @@ -0,0 +1,10 @@ +# draco三方库说明 +## 功能简介 +draco用于改善3D图形的存储和传输。 +## 使用约束 +- IDE版本:DevEco Studio 3.1.0.501 +- SDK版本:ohos_sdk_public 4.1.3.5 +- 三方库版本:v1.5.4 + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/draco/SHA512SUM b/thirdparty/draco/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..b2429ecf955f4e8ea2a4d0ed9817e9c48e957983 --- /dev/null +++ b/thirdparty/draco/SHA512SUM @@ -0,0 +1 @@ +2b98c51e29f144d7b29192b315dcc38f99bb4f518bd6323f001c195c8acc8645f6662d1519e26833c2aee6ea2414dcffa700078bcac4437c1d6535ceb24850f9 draco-1.5.4.tar.gz diff --git a/thirdparty/draco/docs/hap_integrate.md b/thirdparty/draco/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..d2a2306930d5606fc4b58820e69de209d51f9d1d --- /dev/null +++ b/thirdparty/draco/docs/hap_integrate.md @@ -0,0 +1,79 @@ +# draco 集成到应用hap + +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- [开发环境准备](../../../docs/hap_integrate_environment.md) + +## 编译三方库 + +- 下载本仓库 + + ```shell + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` + +- 三方库目录结构 + + ```shell + tpc_c_cplusplus/thirdparty/draco #三方库draco的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── HPKCHECK #测试脚本 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md #三方库简介 + ``` + +- 在lycium目录下编译三方库 + + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + + ```shell + cd lycium + ./build.sh draco + ``` + +- 三方库头文件及生成的库 + + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + + ```shell + draco/arm64-v8a draco/armeabi-v7a + ``` + +- [测试三方库](#测试三方库) + +- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +   + +  ![thirdparty_install_dir](pic/draco_install_dir.png) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + + ```shell + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/draco/${OHOS_ARCH}/lib/libdraco.a) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/draco/${OHOS_ARCH}/include) + ``` + +## 测试三方库 +在lycium目录下执行脚本./test.sh,自动运行thridparty目录下已编译的三方库, + + +```shell + cd lycium + ./test.sh draco +``` + ![draco_test](pic/draco_test.png) + +## 参考资料 + +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) \ No newline at end of file diff --git a/thirdparty/draco/docs/pic/draco_install_dir.png b/thirdparty/draco/docs/pic/draco_install_dir.png new file mode 100644 index 0000000000000000000000000000000000000000..6d25a354cb91fd702c3f273217f05393c67dd294 Binary files /dev/null and b/thirdparty/draco/docs/pic/draco_install_dir.png differ diff --git a/thirdparty/draco/docs/pic/draco_test.png b/thirdparty/draco/docs/pic/draco_test.png new file mode 100644 index 0000000000000000000000000000000000000000..f610911b61ecf9644d00fa44e56fa26a6d6d15ec Binary files /dev/null and b/thirdparty/draco/docs/pic/draco_test.png differ diff --git a/thirdparty/draco/docs/pic/draco_usage.png b/thirdparty/draco/docs/pic/draco_usage.png new file mode 100644 index 0000000000000000000000000000000000000000..fd3996013c6fdf392fe6d3cb18d498b482c75ed0 Binary files /dev/null and b/thirdparty/draco/docs/pic/draco_usage.png differ diff --git a/thirdparty/flann/HPKBUILD b/thirdparty/flann/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..471ff553fbd5c42be8fd63347d04a068167f8be5 --- /dev/null +++ b/thirdparty/flann/HPKBUILD @@ -0,0 +1,63 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: wangjialun <2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com> , wangying +# Maintainer: wangyihao<2942375747@qq.com> + +pkgname=flann +pkgver=1.8.4 +pkgrel=0 +pkgdesc="Flann is a library for performing fast approximate nearest neighbor searches in high dimensional spaces. It contains a collection of algorithms we found to work best for nearest neighbor search and a system for automatically choosing the best algorithm and optimum parameters depending on the dataset. " +url="https://github.com/flann-lib/flann/tree/1.8.4" +archs=("armeabi-v7a" "arm64-v8a") +license=("BSD") +depends=() +makedepends=() +source="https://github.com/flann-lib/$pkgname/archive/refs/tags/$pkgver.zip" + +downloadpackage=true +autounpack=true +buildtools="cmake" + +builddir=$pkgname-${pkgver} +packagename=$builddir.zip + +prepare() { + mkdir -p $builddir/$ARCH-build +} + +build() { + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DCMAKE_C_FLAGS="-Wno-unused-command-line-argument" \ + -DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument" -B$ARCH-build -S./ > $buildlog 2>&1 + $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + $MAKE -C $ARCH-build install >> $buildlog 2>&1 + cd $OLDPWD +} + + +check() { + echo "The test must be on an OpenHarmony device!" +} + + +cleanbuild() { + rm -rf ${PWD}/$builddir +} \ No newline at end of file diff --git a/thirdparty/flann/HPKCHECK b/thirdparty/flann/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..505898747ac90d16cb8febff38876187a3430cbd --- /dev/null +++ b/thirdparty/flann/HPKCHECK @@ -0,0 +1,34 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: wangjialun <2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com> , wangying +# Maintainer: wangyihao<2942375747@qq.com> + +source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +# 测试前的准备, 如果不需要可以不写。 +checkprepare(){ + return 0 +} + +# 在OH环境执行测试的接口 +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} \ No newline at end of file diff --git a/thirdparty/flann/OAT.xml b/thirdparty/flann/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9 --- /dev/null +++ b/thirdparty/flann/OAT.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/flann/README.OpenSource b/thirdparty/flann/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..da5345f0a34d3c299086dc2d5e3ce29640fec44f --- /dev/null +++ b/thirdparty/flann/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "flann", + "License": "BSD", + "License File": "https://github.com/flann-lib/flann/blob/master/COPYING", + "Version Number": "v1.8.4", + "Owner": "2942375747@qq.com", + "Upstream URL": "https://github.com/flann-lib/flann", + "Description": "Flann is a library for performing fast approximate nearest neighbor searches in high dimensional spaces. " + } +] \ No newline at end of file diff --git a/thirdparty/flann/README_zh.md b/thirdparty/flann/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..c6f73fc98fce194a30a7779ff418530a8cb15392 --- /dev/null +++ b/thirdparty/flann/README_zh.md @@ -0,0 +1,10 @@ +# draco三方库说明 +## 功能简介 +flann是一个用于在高维空间中执行快速近似最近邻搜索的库。 +## 使用约束 +- IDE版本:DevEco Studio 3.1.0.501 +- SDK版本:ohos_sdk_public 4.1.3.5 +- 三方库版本:v1.8.4 + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/flann/SHA512SUM b/thirdparty/flann/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..86aadf071e4e4ef67b6d52f021d27dd5be97a27b --- /dev/null +++ b/thirdparty/flann/SHA512SUM @@ -0,0 +1 @@ +ec11dbdd6b7b2c7a1cd71dc7c1099265ddc0b00ad0bb8aed1492999f1851cf9d7d991dbc47e4b963b834e592b4e4a7f25466b4302b4371c0c0632e3168f24ded flann-1.8.4.tar.gz diff --git a/thirdparty/flann/docs/hap_integrate.md b/thirdparty/flann/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..dcaa339163921724e1d90df784b9a24eb71b2efb --- /dev/null +++ b/thirdparty/flann/docs/hap_integrate.md @@ -0,0 +1,79 @@ +# flann 集成到应用hap + +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- [开发环境准备](../../../docs/hap_integrate_environment.md) + +## 编译三方库 + +- 下载本仓库 + + ```shell + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` + +- 三方库目录结构 + + ```shell + tpc_c_cplusplus/thirdparty/flann #三方库flann的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── HPKCHECK #测试脚本 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md #三方库简介 + ``` + +- 在lycium目录下编译三方库 + + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + + ```shell + cd lycium + ./build.sh flann + ``` + +- 三方库头文件及生成的库 + + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + + ```shell + flann/arm64-v8a flann/armeabi-v7a + ``` + +- [测试三方库](#测试三方库) + +- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +   + +  ![thirdparty_install_dir](pic/flann_install_dir.png) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + + ```shell + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/flann/${OHOS_ARCH}/lib/libflann.so.1.8.4) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/flann/${OHOS_ARCH}/include) + ``` + +## 测试三方库 +在lycium目录下执行脚本./test.sh,自动运行thridparty目录下已编译的三方库, + + +```shell + cd lycium + ./test.sh flann +``` + ![flann_test](pic/flann_test.png) + +## 参考资料 + +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) \ No newline at end of file diff --git a/thirdparty/flann/docs/pic/flann_install_dir.png b/thirdparty/flann/docs/pic/flann_install_dir.png new file mode 100644 index 0000000000000000000000000000000000000000..40d24677ec471c9b5e82d1b47755c730ca83bd95 Binary files /dev/null and b/thirdparty/flann/docs/pic/flann_install_dir.png differ diff --git a/thirdparty/flann/docs/pic/flann_test.png b/thirdparty/flann/docs/pic/flann_test.png new file mode 100644 index 0000000000000000000000000000000000000000..1f7b7bbec2734d102a6efcf723a2e9193d89afea Binary files /dev/null and b/thirdparty/flann/docs/pic/flann_test.png differ diff --git a/thirdparty/flann/docs/pic/flann_usage.png b/thirdparty/flann/docs/pic/flann_usage.png new file mode 100644 index 0000000000000000000000000000000000000000..3ded28246a67358b4e15078fbcfd2ea105e98637 Binary files /dev/null and b/thirdparty/flann/docs/pic/flann_usage.png differ