bug: do not redefine targets in config file.

This commit is contained in:
Carlos O'Ryan 2019-09-01 16:42:33 -04:00 committed by GitHub
commit 03c3da1e78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,10 @@ foreach (_target
type_expr)
set(scoped_name "googleapis-c++::${_target}_protos")
set(imported_name "googleapis_cpp_${_target}_protos")
add_library(${scoped_name} IMPORTED INTERFACE)
set_target_properties(${scoped_name}
PROPERTIES INTERFACE_LINK_LIBRARIES ${imported_name})
if (NOT TARGET ${scoped_name})
add_library(${scoped_name} IMPORTED INTERFACE)
set_target_properties(${scoped_name}
PROPERTIES INTERFACE_LINK_LIBRARIES
${imported_name})
endif ()
endforeach ()