718c41634f
1.项目后端整体迁移至PaddleOCR-NCNN算法,已通过基本的兼容性测试 2.工程改为使用CMake组织,后续为了更好地兼容第三方库,不再提供QMake工程 3.重整权利声明文件,重整代码工程,确保最小化侵权风险 Log: 切换后端至PaddleOCR-NCNN,切换工程为CMake Change-Id: I4d5d2c5d37505a4a24b389b1a4c5d12f17bfa38c
44 lines
1.5 KiB
CMake
44 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 3.1) # for CMAKE_CXX_STANDARD
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
macro(ncnn_install_tool toolname)
|
|
install(TARGETS ${toolname} RUNTIME DESTINATION bin)
|
|
endmacro()
|
|
if(MSVC)
|
|
# warning C4018: '<': signed/unsigned mismatch
|
|
# warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
|
|
# warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
|
add_definitions(/wd4018 /wd4244 /wd4996)
|
|
endif()
|
|
|
|
add_subdirectory(caffe)
|
|
add_subdirectory(mxnet)
|
|
add_subdirectory(onnx)
|
|
add_subdirectory(darknet)
|
|
if(NCNN_INT8)
|
|
add_subdirectory(quantize)
|
|
else()
|
|
message(WARNING "NCNN_INT8 disabled, quantize tools won't be built")
|
|
endif()
|
|
|
|
add_executable(ncnn2mem ncnn2mem.cpp)
|
|
target_link_libraries(ncnn2mem PRIVATE ncnn)
|
|
if(NCNN_VULKAN)
|
|
target_link_libraries(ncnn2mem PRIVATE ${Vulkan_LIBRARY})
|
|
endif()
|
|
|
|
add_executable(ncnnoptimize ncnnoptimize.cpp)
|
|
target_link_libraries(ncnnoptimize PRIVATE ncnn)
|
|
if(NCNN_VULKAN)
|
|
target_link_libraries(ncnnoptimize PRIVATE ${Vulkan_LIBRARY})
|
|
endif()
|
|
|
|
add_executable(ncnnmerge ncnnmerge.cpp)
|
|
|
|
# add all tools to a virtual project group
|
|
set_property(TARGET ncnn2mem PROPERTY FOLDER "tools")
|
|
set_property(TARGET ncnnoptimize PROPERTY FOLDER "tools")
|
|
set_property(TARGET ncnnmerge PROPERTY FOLDER "tools")
|
|
ncnn_install_tool(ncnn2mem)
|
|
ncnn_install_tool(ncnnmerge)
|
|
ncnn_install_tool(ncnnoptimize)
|