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 @@ -73,10 +73,10 @@ find_package_handle_standard_args(onnxruntime
7373if (onnxruntime_FOUND)
7474 set (onnxruntime_LIBRARIES ${onnxruntime_LIBRARY} )
7575 set (onnxruntime_INCLUDE_DIRS ${onnxruntime_INCLUDE_DIR} )
76-
77- if (NOT TARGET onnxruntime)
78- add_library (onnxruntime UNKNOWN IMPORTED )
79- set_target_properties (onnxruntime PROPERTIES
76+
77+ if (NOT TARGET onnxruntime::onnxruntime )
78+ add_library (onnxruntime::onnxruntime UNKNOWN IMPORTED )
79+ set_target_properties (onnxruntime::onnxruntime PROPERTIES
8080 IMPORTED_LOCATION "${onnxruntime_LIBRARY} "
8181 INTERFACE_INCLUDE_DIRECTORIES "${onnxruntime_INCLUDE_DIRS} "
8282 )
Original file line number Diff line number Diff line change @@ -121,16 +121,11 @@ if(WAMR_BUILD_WASI_NN_ONNX EQUAL 1)
121121 ${WASI_NN_ROOT} /src/wasi_nn_onnx.cpp
122122 )
123123
124- target_include_directories (
125- wasi_nn_onnx
126- PUBLIC ${INTERFACE_INCLUDE_DIRECTORIES}
127- )
128-
129124 target_link_libraries (
130125 wasi_nn_onnx
131126 PUBLIC
132127 vmlib
133- onnxruntime
128+ onnxruntime::onnxruntime
134129 )
135130
136131 install (TARGETS wasi_nn_onnx DESTINATION lib)
You can’t perform that action at this time.
0 commit comments