aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2018-01-19 12:05:00 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2018-01-19 12:05:00 -0500
commit9d0a44c9de81222929e527ba245cf52a097ca146 (patch)
tree581f339426c5e1f2d375f10a2bc5f86381db6e1b /cmake
parent47b7d2c7cadf74ceec90fc5042232819cd0dd557 (diff)
downloadprotobuf-9d0a44c9de81222929e527ba245cf52a097ca146.tar.gz
protobuf-9d0a44c9de81222929e527ba245cf52a097ca146.tar.bz2
protobuf-9d0a44c9de81222929e527ba245cf52a097ca146.zip
cmake: privately add sources to targets
Public sources get added to dependencies of the target as well which can cause duplicate symbols.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/protobuf-config.cmake.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/protobuf-config.cmake.in b/cmake/protobuf-config.cmake.in
index fd67edc3..acedcc7a 100644
--- a/cmake/protobuf-config.cmake.in
+++ b/cmake/protobuf-config.cmake.in
@@ -110,7 +110,7 @@ function(protobuf_generate)
set(${protobuf_generate_OUT_VAR} ${_generated_srcs_all} PARENT_SCOPE)
endif()
if(protobuf_generate_TARGET)
- target_sources(${protobuf_generate_TARGET} PUBLIC ${_generated_srcs_all})
+ target_sources(${protobuf_generate_TARGET} PRIVATE ${_generated_srcs_all})
endif()
endfunction()