diff --git a/.gitmodules b/.gitmodules index a8f0d753..19430fed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -152,3 +152,7 @@ [submodule "zlib"] path = zlib url = https://github.com/madler/zlib.git +[submodule "FileLoader"] + path = FileLoader + url = ../FileLoader.git + diff --git a/FileLoader b/FileLoader new file mode 160000 index 00000000..4ef9d0b1 --- /dev/null +++ b/FileLoader @@ -0,0 +1 @@ +Subproject commit 4ef9d0b1ae71812784780e5c1cef6079c9857868 diff --git a/build/CommonTargets.CMake b/build/CommonTargets.CMake index eaa31ce4..f722aa2f 100644 --- a/build/CommonTargets.CMake +++ b/build/CommonTargets.CMake @@ -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 FileLoader +ExternalProject_Add(FileLoader + PREFIX FileLoader + SOURCE_DIR "${THIRDPARTY_DIR}/FileLoader" + CMAKE_CACHE_ARGS + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/FileLoader + -DBUILD_FILELOADER_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/FileLoader + -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_FILELOADER_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/FileLoader/lib/cmake/mnn") +set(_FINDPACKAGE_FILELOADER_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/FileLoader/lib") +set(_FINDPACKAGE_FILELOADER_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/FileLoader/include") + # -------------------------------------------------------- # builds ipfs-lite-cpp ExternalProject_Add(ipfs-lite-cpp