vcpkg/ports/opencv/0005-remove-custom-protobuf-find-package.patch

26 lines
817 B
Diff
Raw Normal View History

2018-12-12 01:34:00 +08:00
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
2018-12-13 18:44:01 +08:00
@@ -633,7 +633,10 @@ include(cmake/OpenCVFindLibsGUI.cmake)
2018-12-12 01:34:00 +08:00
include(cmake/OpenCVFindLibsVideo.cmake)
include(cmake/OpenCVFindLibsPerf.cmake)
include(cmake/OpenCVFindLAPACK.cmake)
-include(cmake/OpenCVFindProtobuf.cmake)
+find_package(protobuf)
2018-12-13 18:44:01 +08:00
+if(Protobuf_LIBRARIES)
+ set(HAVE_PROTOBUF TRUE)
+endif()
2018-12-12 01:34:00 +08:00
# ----------------------------------------------------------------------------
# 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})
2018-12-13 18:44:01 +08:00
+set(libs protobuf::libprotobuf ${LAPACK_LIBRARIES})
2018-12-12 01:34:00 +08:00
if(OPENCV_DNN_OPENCL AND HAVE_OPENCL)
list(APPEND include_dirs ${OPENCL_INCLUDE_DIRS})
else()