File tree 2 files changed +10
-5
lines changed 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 36
36
- name : Install dependencies
37
37
if : startsWith(matrix.os, 'mac')
38
38
run : |
39
- brew install opencv
39
+ brew install opencv onnxruntime
40
40
- uses : jurplel/install-qt-action@v4
41
41
with :
42
42
version : ${{ matrix.qt_version }}
Original file line number Diff line number Diff line change @@ -2399,12 +2399,17 @@ if (MSVC)
2399
2399
# target_compile_options(SerialPrograms PRIVATE /arch:AVX512 /DPA_Arch_x64_AVX512)
2400
2400
# target_compile_options(SerialPrograms PRIVATE /arch:AVX512 /DPA_Arch_x64_AVX512GF)
2401
2401
else ()
2402
- # Find ONNX Runtime
2403
- target_include_directories (SerialPrograms PRIVATE /opt/homebrew/include /onnxruntime)
2404
- target_link_libraries (SerialPrograms PRIVATE /opt/homebrew/lib/libonnxruntime.dylib)
2402
+ # Get root path where Homebrew installs libraries. Example root path: "/opt/homebrew/",
2403
+ # where you can find libraries in "/opt/homebrew/lib/" and headers in "/opt/homebrew/include/".
2404
+ # CMake does not support ONNX Runtime, so we have to add ONNX Runtime paths on our own.
2405
+ # Save the root path as CMake variable HOMEBREW_PREFIX.
2406
+ execute_process (COMMAND brew --prefix OUTPUT_VARIABLE HOMEBREW_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
2405
2407
2406
- # Find OpenCV
2408
+ # Get ONNX Runtime paths
2409
+ target_include_directories (SerialPrograms PRIVATE ${HOMEBREW_PREFIX} /include /onnxruntime)
2410
+ target_link_libraries (SerialPrograms PRIVATE ${HOMEBREW_PREFIX} /lib/libonnxruntime.dylib)
2407
2411
2412
+ # Find OpenCV
2408
2413
# set(OPENCV_DIR, "/usr/local/opt/opencv/lib/cmake/opencv4")
2409
2414
find_package (OpenCV REQUIRED HINTS "/usr/local/opt/opencv/lib/cmake/opencv4/" )
2410
2415
# set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/opencv/lib/pkgconfig")
You can’t perform that action at this time.
0 commit comments