Merge pull request #12741 from GeorgeMironov:fix-cmake-protobuf

This commit is contained in:
Alexander Alekhin 2018-10-04 14:17:22 +00:00
commit 4fa6734320

View File

@ -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