mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-30 03:37:44 +00:00
Do not link onnxruntime jni output with JNI_LIBRARIES
- Linking onnxruntime with JNI_LIBRARIES includes some unnecessary links to native libraries (e.g. libawt) which are not actually used or required by the output onnx library. This causes unsatisfied link exceptions when trying to load the onnx library without including these libraries.
This commit is contained in:
parent
8a1de1a582
commit
a319ad29b3
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ file(GLOB onnxruntime4j_native_src
|
|||
add_library(onnxruntime4j_jni SHARED ${onnxruntime4j_native_src} ${onnxruntime4j_generated})
|
||||
onnxruntime_add_include_to_target(onnxruntime4j_jni onnxruntime_session)
|
||||
target_include_directories(onnxruntime4j_jni PRIVATE ${REPO_ROOT}/include ${REPO_ROOT}/java/src/main/native)
|
||||
target_link_libraries(onnxruntime4j_jni PUBLIC ${JNI_LIBRARIES} onnxruntime onnxruntime4j_generated)
|
||||
target_link_libraries(onnxruntime4j_jni PUBLIC onnxruntime onnxruntime4j_generated)
|
||||
|
||||
# Now the jar, jni binary and shared lib binary have been built, now to build the jar with the binaries added.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue