This commit is contained in:
test123456654321 2024-11-05 16:14:51 +08:00 committed by GitHub
parent 194544706a
commit faeaed134b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

1
.gitignore vendored
View File

@ -42,4 +42,3 @@ src/plugins/libs/opencv-static.zip
src/plugins/libs/onnxruntime-static.zip
src/plugins/libs/onnxruntime-static/onnxruntime-static.7z
src/plugins/libs/opencv-static/opencv-static.7z
src/plugins/libs/opencv-static/opencv-4.8.1-windows-vs2022-mt.7z

View File

@ -29,7 +29,10 @@ target_include_directories(Clipper2Lib PUBLIC ${CMAKE_CURRENT_LIST_DIR}/Clipper2
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(OnnxRuntime_DIR ${CMAKE_CURRENT_LIST_DIR}/onnxruntime-static/windows-x64)
set(OpenCV_DIR ${CMAKE_CURRENT_LIST_DIR}/opencv-static/windows-x64)
set(OpenCV_ARCH x64)
else()
set(OnnxRuntime_DIR ${CMAKE_CURRENT_LIST_DIR}/onnxruntime-static/windows-x86)
set(OpenCV_DIR ${CMAKE_CURRENT_LIST_DIR}/opencv-static/windows-x86)
set(OpenCV_ARCH x86)
endif()
set(OpenCV_RUNTIME vc16)

View File

@ -30,7 +30,7 @@ onnx = os.path.normpath(
opencv = os.path.normpath(
os.path.join(
os.path.dirname(__file__),
r"..\libs\opencv-static\windows-x64\x64\vc17\staticlib\opencv_core481.lib",
r"..\libs\opencv-static\windows-x64\x64\vc16\staticlib\opencv_core470.lib",
)
)
onnx_1 = os.path.normpath(
@ -50,6 +50,6 @@ if os.path.exists(onnx) == False:
if os.path.exists(opencv) == False:
os.makedirs(os.path.dirname(opencv_1), exist_ok=True)
os.system(
rf'curl -SLo "{opencv_1}" https://github.com/RapidAI/OpenCVBuilder/releases/download/4.8.1/opencv-4.8.1-windows-vs2022-mt.7z'
rf'curl -SLo "{opencv_1}" https://github.com/RapidAI/OpenCVBuilder/releases/download/4.7.0/opencv-4.7.0-windows-vs2019-mt.7z'
)
os.system(rf'7z x -y "{opencv_1}" -o{os.path.dirname(opencv_1)}')