aboutsummaryrefslogtreecommitdiff
path: root/ports/opencv/0005-remove-custom-protobuf-find-package.patch
blob: 91ac137f9f74943862de940093a41b2f3a990a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -633,7 +633,10 @@ include(cmake/OpenCVFindLibsGUI.cmake)
 include(cmake/OpenCVFindLibsVideo.cmake)
 include(cmake/OpenCVFindLibsPerf.cmake)
 include(cmake/OpenCVFindLAPACK.cmake)
-include(cmake/OpenCVFindProtobuf.cmake)
+find_package(protobuf)
+if(Protobuf_LIBRARIES)
+  set(HAVE_PROTOBUF TRUE)
+endif()
 
 # ----------------------------------------------------------------------------
 #  Detect other 3rd-party libraries/tools
--- a/modules/dnn/CMakeLists.txt
+++ b/modules/dnn/CMakeLists.txt
@@ -78,7 +78,7 @@ endif()
 
 set(include_dirs ${fw_inc})
 set(sources_options "")
-set(libs libprotobuf ${LAPACK_LIBRARIES})
+set(libs protobuf::libprotobuf ${LAPACK_LIBRARIES})
 if(OPENCV_DNN_OPENCL AND HAVE_OPENCL)
   list(APPEND include_dirs ${OPENCL_INCLUDE_DIRS})
 else()