Merge pull request #4196 from mathstuf/cmake-private-target-sources
cmake: privately add sources to targets
This commit is contained in:
commit
1681fe664b
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user