File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -693,19 +693,17 @@ if (USE_NCNN)
693
693
694
694
set (NCNN_VERSION "20201218" )
695
695
set (NCNN_TARBALL_HASH "1dac4571168b83ee99efaba969c01e8054cd8e3d9b67ca4893f32b767ab4ec48" )
696
+ set (NCNN_BUILD_FLAGS -DCMAKE_BUILD_TYPE=Release -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_TESTS=OFF )
696
697
697
698
if (RPI3)
698
699
ExternalProject_Add(
699
700
ncnn
700
701
PREFIX ncnn
701
- GIT_REPOSITORY https://github.com/tencent/ncnn.git
702
- GIT_TAG ${NCNN_VERSION}
703
702
URL https://github.com/Tencent/ncnn/releases/download/${NCNN_VERSION} /ncnn-${NCNN_VERSION} -full-source .zip
704
703
URL_HASH SHA256=${NCNN_TARBALL_HASH}
705
704
PATCH_COMMAND ${CMAKE_SOURCE_DIR} /cmake/patches-apply.sh ${NCNN_PATCHES}
706
- CMAKE_ARGS -DPI3=ON -DCMAKE_TOOLCHAIN_FILE=../toolchains/pi3.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DProtobuf_INCLUDE_DIR= ${CMAKE_BINARY_DIR} /protobuf/src/protobuf/src -DProtobuf_LIBRARIES= ${PROTOBUF_LIB_DIR} /libprotobuf.so -DProtobuf_PROTOC_EXECUTABLE= ${PROTOBUF_LIB_DIR} /protoc -DNCNN_BUILD_EXAMPLES= OFF -DNCNN_BUILD_BENCHMARK= OFF -DNCNN_BUILD_TOOLS= OFF -DNCNN_BUILD_TESTS= OFF
705
+ CMAKE_ARGS -DPI3=ON -DCMAKE_TOOLCHAIN_FILE=../toolchains/pi3.toolchain.cmake ${NCNN_BUILD_FLAGS}
707
706
INSTALL_COMMAND ""
708
- DEPENDS protobuf
709
707
)
710
708
else ()
711
709
ExternalProject_Add(
@@ -714,9 +712,8 @@ if (USE_NCNN)
714
712
URL https://github.com/Tencent/ncnn/releases/download/${NCNN_VERSION} /ncnn-${NCNN_VERSION} -full-source .zip
715
713
URL_HASH SHA256=${NCNN_TARBALL_HASH}
716
714
PATCH_COMMAND ${CMAKE_SOURCE_DIR} /cmake/patches-apply.sh ${NCNN_PATCHES}
717
- CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release -DProtobuf_INCLUDE_DIR= ${CMAKE_BINARY_DIR} /protobuf/src/protobuf/src -DProtobuf_LIBRARIES= ${PROTOBUF_LIB_DIR} /libprotobuf.so -DProtobuf_PROTOC_EXECUTABLE= ${PROTOBUF_LIB_DIR} /protoc -DNCNN_BUILD_EXAMPLES= OFF -DNCNN_BUILD_BENCHMARK= OFF -DNCNN_BUILD_TOOLS= OFF -DNCNN_BUILD_TESTS= OFF
715
+ CMAKE_ARGS ${NCNN_BUILD_FLAGS}
718
716
INSTALL_COMMAND ""
719
- DEPENDS protobuf
720
717
)
721
718
endif ()
722
719
You can’t perform that action at this time.
0 commit comments