Fix install with external protobuf

pull/12741/head
Georgy Mironov 6 years ago
parent 0ffc186680
commit 60c26f8f1e
  1. 6
      cmake/OpenCVFindProtobuf.cmake

@ -44,8 +44,10 @@ else()
if(Protobuf_FOUND)
if(TARGET protobuf::libprotobuf)
add_library(libprotobuf INTERFACE)
target_link_libraries(libprotobuf INTERFACE protobuf::libprotobuf)
add_library(libprotobuf INTERFACE IMPORTED)
set_target_properties(libprotobuf PROPERTIES
INTERFACE_LINK_LIBRARIES protobuf::libprotobuf
)
else()
add_library(libprotobuf UNKNOWN IMPORTED)
set_target_properties(libprotobuf PROPERTIES

Loading…
Cancel
Save