Skip to content

Commit 4b1436c

Browse files
author
Gin
committed
add comments in CMake for ONNX
1 parent d66db26 commit 4b1436c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

SerialPrograms/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,14 +2399,17 @@ if (MSVC)
23992399
# target_compile_options(SerialPrograms PRIVATE /arch:AVX512 /DPA_Arch_x64_AVX512)
24002400
# target_compile_options(SerialPrograms PRIVATE /arch:AVX512 /DPA_Arch_x64_AVX512GF)
24012401
else()
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.
24022406
execute_process(COMMAND brew --prefix OUTPUT_VARIABLE HOMEBREW_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
24032407

2404-
# Find ONNX Runtime
2408+
# Get ONNX Runtime paths
24052409
target_include_directories(SerialPrograms PRIVATE ${HOMEBREW_PREFIX}/include/onnxruntime)
24062410
target_link_libraries(SerialPrograms PRIVATE ${HOMEBREW_PREFIX}/lib/libonnxruntime.dylib)
24072411

24082412
# Find OpenCV
2409-
24102413
# set(OPENCV_DIR, "/usr/local/opt/opencv/lib/cmake/opencv4")
24112414
find_package(OpenCV REQUIRED HINTS "/usr/local/opt/opencv/lib/cmake/opencv4/")
24122415
# set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/opencv/lib/pkgconfig")

0 commit comments

Comments
 (0)