Commit af0ea6fa authored by Clément Péron's avatar Clément Péron

cmake: link with target to also get include directory

cxx-generate-packed-data needs to link with protobuf library for the C++
source file.

Use the protobuf::libprotobuf to get both library and include directory.
Signed-off-by: default avatarClément Péron <peron.clem@gmail.com>
parent 49966f6c
...@@ -220,7 +220,7 @@ GENERATE_TEST_SOURCES(${TEST_DIR}/test-full.proto t/test-full.pb-c.c t/test-full ...@@ -220,7 +220,7 @@ GENERATE_TEST_SOURCES(${TEST_DIR}/test-full.proto t/test-full.pb-c.c t/test-full
ADD_EXECUTABLE(cxx-generate-packed-data ${TEST_DIR}/generated-code2/cxx-generate-packed-data.cc t/test-full.pb.h t/test-full.pb.cc protobuf-c/protobuf-c.pb.cc protobuf-c/protobuf-c.pb.h) ADD_EXECUTABLE(cxx-generate-packed-data ${TEST_DIR}/generated-code2/cxx-generate-packed-data.cc t/test-full.pb.h t/test-full.pb.cc protobuf-c/protobuf-c.pb.cc protobuf-c/protobuf-c.pb.h)
TARGET_LINK_LIBRARIES(cxx-generate-packed-data TARGET_LINK_LIBRARIES(cxx-generate-packed-data
${PROTOBUF_LIBRARY} protobuf::libprotobuf
${protobuf_ABSL_USED_TARGETS} ${protobuf_ABSL_USED_TARGETS}
${protobuf_UTF8_USED_TARGETS} ${protobuf_UTF8_USED_TARGETS}
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment