mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Add a flag to allow for linking against shared system protobuf (#7577)
In some environments you would like to link to the shared libprotobuf from the system. This is fine to use if you have full control over all protobuf users in your environment. This need for the existence of this option is already mentioned as a comment in CMakeLists.txt, this adds it now.
This commit is contained in:
parent
3a68c389d9
commit
203efef147
1 changed files with 3 additions and 3 deletions
|
|
@ -690,9 +690,9 @@ if(Protobuf_FOUND OR Protobuf_FOUND)
|
|||
#We have a check here but most of the cmake users don't know the Protobuf_USE_STATIC_LIBS
|
||||
# variable exists and may leave it in a wrong state.
|
||||
if(NOT Protobuf_USE_STATIC_LIBS)
|
||||
#Indeed here should be a warning, not a fatal error. ONNX Runtime itself can work in such a
|
||||
#setting but it may cause compatibility issue when ONNX Runtime is integrated with the other ONNX ecosystem softwares.
|
||||
message(FATAL_ERROR "Please enable Protobuf_USE_STATIC_LIBS")
|
||||
# ONNX Runtime itself can work in such a setting but it may cause compatibility issues
|
||||
# when ONNX Runtime is integrated with the other ONNX ecosystem softwares.
|
||||
message(WARNING "Use Protobuf_USE_STATIC_LIBS to ensure compatibility with other ONNX ecosystem components.")
|
||||
endif()
|
||||
else()
|
||||
set(PROTOBUF_LIB protobuf::libprotobuf-lite)
|
||||
|
|
|
|||
Loading…
Reference in a new issue