Properly use cmake variable in ONNXRuntime (#15776)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
memorylorry 2024-08-24 22:52:17 +08:00 committed by GitHub
parent 08f30c4033
commit 98fcd14142
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View file

@ -49,6 +49,9 @@ elseif (APPLE)
# set(ONNXRUNTIME_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/onnxruntime-osx-x64-${ONNXRUNTIME_VERSION}")
# Apple Universal binary
# set(ONNXRUNTIME_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/onnxruntime-osx-universal2-${ONNXRUNTIME_VERSION}")
else ()
message(SEND_ERROR "Variable ONNXRUNTIME_ROOT is not set properly. Please check if your cmake project \
is not compiled with `-D WIN32=TRUE`, `-D LINUX=TRUE`, or `-D APPLE=TRUE`!")
endif ()
include_directories(${PROJECT_NAME} ${ONNXRUNTIME_ROOT}/include)