Skip to content

Commit

Permalink
Add MNNLoader library to thirdparty project
Browse files Browse the repository at this point in the history
  - Add MNNLoader to CMake build
  • Loading branch information
scorpioluck20 committed May 30, 2023
1 parent 59a2252 commit a676e4b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,6 @@
[submodule "zlib"]
path = zlib
url = https://github.com/madler/zlib.git
[submodule "MNNLoader"]
path = MNNLoader
url = https://github.com/GeniusVentures/MNNLoader.git
1 change: 1 addition & 0 deletions MNNLoader
Submodule MNNLoader added at d88410
19 changes: 19 additions & 0 deletions build/CommonTargets.CMake
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,25 @@ set(_FINDPACKAGE_MNN_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/lib")
set(_FINDPACKAGE_MNN_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/include")
include_directories(${_FINDPACKAGE_MNN_INCLUDE_DIR})

# --------------------------------------------------------
# Build MNNLoader
ExternalProject_Add(MNNLoader
PREFIX MNNLoader
SOURCE_DIR "${THIRDPARTY_DIR}/MNNLoader"
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/MNNLoader
-DBUILD_MNNLOADER_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/MNNLoader
-DMNN_INCLUDE_DIR:PATH=${_FINDPACKAGE_MNN_INCLUDE_DIR}
-DMNN_LIBRARY_DIR:PATH=${_FINDPACKAGE_MNN_LIBRARY_DIR}
-DTESTING:BOOL=OFF
${_CMAKE_COMMON_BUILD_PARAMS}
DEPENDS MNN
)

set(_FINDPACKAGE_MNNLOADER_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNNLoader/lib/cmake/mnn")
set(_FINDPACKAGE_MNNLOADER_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNNLoader/lib")
set(_FINDPACKAGE_MNNLOADER_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNNLoader/include")

# --------------------------------------------------------
# builds ipfs-lite-cpp
ExternalProject_Add(ipfs-lite-cpp
Expand Down

0 comments on commit a676e4b

Please sign in to comment.