Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
bug: do not redefine targets in config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
coryan authored Sep 1, 2019
2 parents 51d2b08 + 1f68a41 commit 03c3da1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmake/config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

0 comments on commit 03c3da1

Please sign in to comment.