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

Commit 03c3da1

Browse files
authored
bug: do not redefine targets in config file.
2 parents 51d2b08 + 1f68a41 commit 03c3da1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmake/config.cmake.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ foreach (_target
3838
type_expr)
3939
set(scoped_name "googleapis-c++::${_target}_protos")
4040
set(imported_name "googleapis_cpp_${_target}_protos")
41-
add_library(${scoped_name} IMPORTED INTERFACE)
42-
set_target_properties(${scoped_name}
43-
PROPERTIES INTERFACE_LINK_LIBRARIES ${imported_name})
41+
if (NOT TARGET ${scoped_name})
42+
add_library(${scoped_name} IMPORTED INTERFACE)
43+
set_target_properties(${scoped_name}
44+
PROPERTIES INTERFACE_LINK_LIBRARIES
45+
${imported_name})
46+
endif ()
4447
endforeach ()

0 commit comments

Comments
 (0)