diff options
| author | Xing Ji <33065325+jixingcn@users.noreply.github.com> | 2021-07-23 06:31:44 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-22 15:31:44 -0700 |
| commit | eea00aaa919f720e2dfc8b86ebe1402a5c4679be (patch) | |
| tree | 3a3f018b26faff417ba19981e3cc8a7f1a7bb668 /ports/mnn | |
| parent | 10c81db0c95f91acfc97e7f51f58c3834a1c9892 (diff) | |
| download | vcpkg-eea00aaa919f720e2dfc8b86ebe1402a5c4679be.tar.gz vcpkg-eea00aaa919f720e2dfc8b86ebe1402a5c4679be.zip | |
[flatbuffers] upgrade the `flatbuffers` to v2.0.0 (#18897)
* upgrade the flatbuffers's version
* run `vcpkg x-add-version`
* upgrade flatbuffers to v2.0.0 for mnn
* add new port-version of `mnn` after upgrade the flatbuffers
* fix the port-version of `mnn`
* Update ports/mnn/vcpkg.json
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
* Update ports/flatbuffers/CONTROL
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
* run `vcpkg x-add-version flatbuffers --overwrite-version`
* run `vcpkg x-add-version mnn --overwrite-version`
* regenerate code files by flatc before build
* run `vcpkg x-add-version mnn --overwrite-version`
* add `flatbuffers` in dependencies
* run `vcpkg x-add-version mnn --overwrite-version`
* new port version for mnn
* run `vcpkg x-add-version mnn --overwrite-version` to rebuild
* Update versions/m-/mnn.json
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
* Update ports/mnn/vcpkg.json
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
* run `vcpkg x-add-version mnn --overwrite-version`
* Add missing quotes.
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
Diffstat (limited to 'ports/mnn')
| -rw-r--r-- | ports/mnn/portfile.cmake | 26 | ||||
| -rw-r--r-- | ports/mnn/vcpkg.json | 7 |
2 files changed, 30 insertions, 3 deletions
diff --git a/ports/mnn/portfile.cmake b/ports/mnn/portfile.cmake index 1546d49cb..8147fddb1 100644 --- a/ports/mnn/portfile.cmake +++ b/ports/mnn/portfile.cmake @@ -34,11 +34,32 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS )
# 'cuda' feature in Windows failes with Ninja because of parallel PDB access. Make it optional
-set(NINJA_OPTION PREFER_NINJA)
+set(NINJA_OPTION PREFER_NINJA)
if("cuda" IN_LIST FEATURES)
unset(NINJA_OPTION)
endif()
+set(FLATC_EXEC ${CURRENT_HOST_INSTALLED_DIR}/tools/flatbuffers/flatc${VCPKG_HOST_EXECUTABLE_SUFFIX})
+if (NOT EXISTS "${FLATC_EXEC}")
+ message(FATAL_ERROR "Expected ${FLATC_EXEC} to exist.")
+endif()
+
+# regenerate some code files by schemes and flatbuffers
+vcpkg_execute_build_process(
+ COMMAND "${FLATC_EXEC}" "-c" "-b" "--gen-object-api" "--reflect-names"
+ "../default/BasicOptimizer.fbs"
+ "../default/CaffeOp.fbs"
+ "../default/GpuLibrary.fbs"
+ "../default/MNN.fbs"
+ "../default/Tensor.fbs"
+ "../default/TensorflowOp.fbs"
+ "../default/TFQuantizeOp.fbs"
+ "../default/Type.fbs"
+ "../default/UserDefine.fbs"
+ WORKING_DIRECTORY "${SOURCE_PATH}/schema/current/"
+ LOGNAME flatc-${TARGET_TRIPLET}
+ )
+
if(VCPKG_TARGET_IS_WINDOWS)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_RUNTIME_MT)
list(APPEND PLATFORM_OPTIONS -DMNN_WIN_RUNTIME_MT=${USE_RUNTIME_MT})
@@ -61,10 +82,11 @@ vcpkg_install_cmake() vcpkg_copy_pdbs()
vcpkg_download_distfile(COPYRIGHT_PATH
- URLS "https://apache.org/licenses/LICENSE-2.0.txt"
+ URLS "https://apache.org/licenses/LICENSE-2.0.txt"
FILENAME 98f6b79b778f7b0a1541.txt
SHA512 98f6b79b778f7b0a15415bd750c3a8a097d650511cb4ec8115188e115c47053fe700f578895c097051c9bc3dfb6197c2b13a15de203273e1a3218884f86e90e8
)
+
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(RENAME ${COPYRIGHT_PATH} ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json index cb72880b5..27676e863 100644 --- a/ports/mnn/vcpkg.json +++ b/ports/mnn/vcpkg.json @@ -1,12 +1,17 @@ { "name": "mnn", - "version-string": "1.1.0", + "version": "1.1.0", + "port-version": 1, "description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba", "homepage": "https://www.mnn.zone/", "license": "Apache-2.0", "supports": "!(arm | uwp | ios | android)", "dependencies": [ "flatbuffers", + { + "name": "flatbuffers", + "host": true + }, "rapidjson", "stb" ], |
