移除cv,请使用@yizhi/cv包

This commit is contained in:
2025-03-17 12:24:30 +08:00
parent b48d2daffb
commit 6bf7db1f4c
22 changed files with 72 additions and 355 deletions

View File

@ -85,24 +85,6 @@ if(EXISTS ${MNN_CMAKE_FILE})
endif()
endif()
# OpenCV
set(OpenCV_CMAKE_FILE ${CMAKE_SOURCE_DIR}/thirdpart/OpenCV/${CMAKE_BUILD_TYPE}/config.cmake)
if(EXISTS ${OpenCV_CMAKE_FILE})
include(${OpenCV_CMAKE_FILE})
message(STATUS "OpenCV_LIB_DIR: ${OpenCV_LIB_DIR}")
message(STATUS "OpenCV_INCLUDE_DIR: ${OpenCV_INCLUDE_DIR}")
message(STATUS "OpenCV_LIBS: ${OpenCV_LIBS}")
include_directories(${OpenCV_INCLUDE_DIRS})
link_directories(${OpenCV_LIB_DIR})
if(NODE_ADDON_FOUND)
add_node_targert(cv cxx/cv/node.cc)
target_link_libraries(cv ${OpenCV_LIBS})
target_compile_definitions(cv PUBLIC USE_OPENCV)
list(APPEND NODE_COMMON_SOURCES cxx/cv/node.cc)
endif()
endif()
# OnnxRuntime
set(ONNXRuntime_CMAKE_FILE ${CMAKE_SOURCE_DIR}/thirdpart/ONNXRuntime/config.cmake)
if(EXISTS ${ONNXRuntime_CMAKE_FILE})
@ -137,11 +119,6 @@ if(NODE_ADDON_FOUND)
target_link_libraries(addon ${ONNXRuntime_LIBS})
target_compile_definitions(addon PUBLIC USE_ONNXRUNTIME)
endif()
# OpenCV
if(EXISTS ${OpenCV_CMAKE_FILE})
target_link_libraries(addon ${OpenCV_LIBS})
target_compile_definitions(addon PUBLIC USE_OPENCV)
endif()
endif()
if(MSVC AND NODE_ADDON_FOUND)