赞
踩
系统:Win10;Visual Studio 2015;CMake3.12.0;GitHub: Tencent/ncnn。
参考官方文献:https://github.com/Tencent/ncnn/wiki/how-to-build
先安装好:VS2015+CMake3.12.0。
D:/protobuf-3.4.0/cmake
D:/protobuf-3.4.0/Builds
protobuf_BUILD_TESTS
和protobuf_MSVC_STATIC_RUNTIME
CMAKE_BUILD_TYPE=Release
CMAKE_CONFIGURATION_TYPES=Release
CMAKE_INSTALL_PREFIX=./install
D:/protobuf-3.4.0/Builds
)中的工程文件(protobuf.sln
),编译其中的INSTALL
项目即可。备注:在系统的环境变量中,在系统变量PATH中添加路径:
D:\protobuf-3.4.0\Builds\install\bin
;然后重启系统!
否则,可能遇到坑:cmake ncnn时,添加不上Protobuf_INCLUDE_DIR
项。
D:/ncnn-master
D:/ncnn-master/Builds
Protobuf_LIBRARIES=D:\protobuf-3.4.0\Builds\install\lib\libprotobuf.lib
Protobuf_INCLUDE_DIR=D:\protobuf-3.4.0\Builds\install\include
Protobuf_PROTOC_EXECUTABLE=D:\protobuf-3.4.0\Builds\install\install/bin/protoc.exe
CMAKE_CONFIGURATION_TYPES=Release
Protobuf_SRC_ROOT_FOLDER=D:/protobuf-3.4.0/src
D:/ncnn-master/Builds
)中的工程文件(ncnn.sln
),编译其中的INSTALL
项目即可。 install
和tools
目录下,即可看到编译好的文件。至此,ncnn编译完成。Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。