vcpkg/ports/opencv/0005-remove-protobuf-target.patch

23 lines
798 B
Diff
Raw Normal View History

diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake
index b9171f14f..6e06310b1 100644
2018-03-04 18:31:06 +08:00
--- a/cmake/OpenCVFindProtobuf.cmake
+++ b/cmake/OpenCVFindProtobuf.cmake
@@ -43,17 +43,6 @@ else()
2018-03-04 18:31:06 +08:00
# end of compatibility block
if(Protobuf_FOUND)
- if(TARGET protobuf::libprotobuf)
- add_library(libprotobuf INTERFACE)
- target_link_libraries(libprotobuf INTERFACE protobuf::libprotobuf)
- else()
- add_library(libprotobuf UNKNOWN IMPORTED)
- set_target_properties(libprotobuf PROPERTIES
- IMPORTED_LOCATION "${Protobuf_LIBRARY}"
- INTERFACE_INCLUDE_SYSTEM_DIRECTORIES "${Protobuf_INCLUDE_DIR}"
2018-03-04 18:31:06 +08:00
- )
- get_protobuf_version(Protobuf_VERSION "${Protobuf_INCLUDE_DIR}")
- endif()
set(HAVE_PROTOBUF TRUE)
endif()
endif()