Skip to content

Commit

Permalink
Add webnn provider export for static build
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanozang committed Oct 22, 2024
1 parent 1e4d27d commit a84ad00
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmake/onnxruntime_providers_webnn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@

add_dependencies(onnxruntime_providers_webnn onnx ${onnxruntime_EXTERNAL_DEPENDENCIES})
set_target_properties(onnxruntime_providers_webnn PROPERTIES FOLDER "ONNXRuntime")
set_target_properties(onnxruntime_providers_webnn PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(onnxruntime_providers_webnn PROPERTIES LINKER_LANGUAGE CXX)

if (NOT onnxruntime_BUILD_SHARED_LIB)
install(TARGETS onnxruntime_providers_webnn EXPORT ${PROJECT_NAME}Targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

0 comments on commit a84ad00

Please sign in to comment.