blob: 5c2ec4a1ad084e167d5fe6ebcd86d06d57f69479 [file] [log] [blame]
Willy Tubaa8d402021-12-07 19:44:31 -08001src_pb = custom_target(
Jie Yangb988dbb2021-08-06 18:34:49 -07002 'proto',
3 command: [
4 find_program('protoc', native: true),
5 '--proto_path=@CURRENT_SOURCE_DIR@',
6 '--cpp_out=@OUTDIR@',
7 '@INPUT@'
8 ],
9 output: [
Jie Yangb988dbb2021-08-06 18:34:49 -070010 'binaryblob.pb.h',
William A. Kennington IIIa191c672022-02-24 10:19:30 -080011 'binaryblob.pb.cc',
Jie Yangb988dbb2021-08-06 18:34:49 -070012 ],
13 input: 'binaryblob.proto')
Willy Tubaa8d402021-12-07 19:44:31 -080014
15binaryblobproto_pre = declare_dependency(
16 include_directories: include_directories('.'),
William A. Kennington IIIa191c672022-02-24 10:19:30 -080017 dependencies: dependency('protobuf'))
Willy Tubaa8d402021-12-07 19:44:31 -080018
19binaryblobproto_lib = static_library(
20 'binaryblob_proto',
William A. Kennington IIIa191c672022-02-24 10:19:30 -080021 src_pb[1],
Willy Tubaa8d402021-12-07 19:44:31 -080022 implicit_include_directories: false,
William A. Kennington IIIa191c672022-02-24 10:19:30 -080023 dependencies: binaryblobproto_pre)
Willy Tubaa8d402021-12-07 19:44:31 -080024
25binaryblobproto_dep = declare_dependency(
26 dependencies: binaryblobproto_pre,
William A. Kennington IIIa191c672022-02-24 10:19:30 -080027 link_with: binaryblobproto_lib,
28 sources: src_pb[0])