File tree Expand file tree Collapse file tree
core/iwasm/libraries/wasi-nn/cmake Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222# endif()
2323
2424# First try to find ONNX Runtime using the CMake config file
25+ # FIXME: This is a temporary workaround for ONNX Runtime's broken CMake config on Linux.
26+ # See https://github.com/microsoft/onnxruntime/issues/25279
27+ # Once the upstream issue is fixed, this conditional can be safely removed.
28+ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" )
29+ find_package (onnxruntime CONFIG QUIET )
30+ if (onnxruntime_FOUND)
31+ return ()
32+ endif ()
33+ endif ()
2534
2635# If not found via CMake config, try to find manually
2736find_path (onnxruntime_INCLUDE_DIR
Original file line number Diff line number Diff line change @@ -123,9 +123,7 @@ if(WAMR_BUILD_WASI_NN_ONNX EQUAL 1)
123123
124124 target_include_directories (
125125 wasi_nn_onnx
126- PUBLIC
127- ${onnxruntime_INCLUDE_DIR} /onnx
128- ${onnxruntime_INCLUDE_DIR}
126+ PUBLIC ${INTERFACE_INCLUDE_DIRECTORIES}
129127 )
130128
131129 target_link_libraries (
You can’t perform that action at this time.
0 commit comments