Skip to content

Commit

Permalink
cmake: try a fix for rpi
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Dec 20, 2024
1 parent 88c94bc commit b2b1bbc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cmake/onnxruntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ find_library(onnxruntime_LIBRARY
PATHS "${onnxruntime_SOURCE_DIR}/lib"
NO_DEFAULT_PATH
)

if(NOT onnxruntime_LIBRARY)
message(FATAL_ERROR "Could not find onnxruntime library")
if(OSSIA_SDK AND LINUX)
set(onnxruntime_LIBRARY "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so")
else()
message(FATAL_ERROR "Could not find onnxruntime library")
endif()
endif()

if(WIN32)
Expand All @@ -73,7 +78,11 @@ find_path(onnxruntime_INCLUDE_DIRS
NO_DEFAULT_PATH
)
if(NOT onnxruntime_INCLUDE_DIRS)
message(FATAL_ERROR "Could not find onnxruntime headers")
if(OSSIA_SDK AND LINUX)
set(onnxruntime_INCLUDE_DIRS "${onnxruntime_SOURCE_DIR}/include")
else()
message(FATAL_ERROR "Could not find onnxruntime headers")
endif()
endif()

# Create an onnxruntime CMake target which will propagate these variables to the targets
Expand Down

0 comments on commit b2b1bbc

Please sign in to comment.