File probuf-name-fix.patch of Package python-onnxruntime

From 695482c65b6f914b5d250a26ce4691711c6d8ecb Mon Sep 17 00:00:00 2001
From: Christian Goll <cgoll@suse.de>
Date: Tue, 30 Jun 2020 15:09:28 +0200
Subject: [PATCH 2/2] probuf name fix

---
 cmake/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 82d52bc5f..1dda0150f 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -369,7 +369,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/external)
 
 if(onnxruntime_PREFER_SYSTEM_LIB)
   set(protobuf_MODULE_COMPATIBLE ON)
-  find_package(protobuf)
+  find_package(Protobuf)
 endif()
 
 
@@ -382,7 +382,7 @@ if(Protobuf_FOUND OR Protobuf_FOUND)
     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")
+      message(WARNING "Please enable Protobuf_USE_STATIC_LIBS")
     endif()
   else()
     set(PROTOBUF_LIB protobuf::libprotobuf-lite)
-- 
2.26.2

openSUSE Build Service is sponsored by