Willy Tu | baa8d40 | 2021-12-07 19:44:31 -0800 | [diff] [blame] | 1 | src_pb = custom_target( |
Jie Yang | b988dbb | 2021-08-06 18:34:49 -0700 | [diff] [blame] | 2 | '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 Yang | b988dbb | 2021-08-06 18:34:49 -0700 | [diff] [blame] | 10 | 'binaryblob.pb.h', |
William A. Kennington III | a191c67 | 2022-02-24 10:19:30 -0800 | [diff] [blame] | 11 | 'binaryblob.pb.cc', |
Jie Yang | b988dbb | 2021-08-06 18:34:49 -0700 | [diff] [blame] | 12 | ], |
| 13 | input: 'binaryblob.proto') |
Willy Tu | baa8d40 | 2021-12-07 19:44:31 -0800 | [diff] [blame] | 14 | |
| 15 | binaryblobproto_pre = declare_dependency( |
| 16 | include_directories: include_directories('.'), |
William A. Kennington III | a191c67 | 2022-02-24 10:19:30 -0800 | [diff] [blame] | 17 | dependencies: dependency('protobuf')) |
Willy Tu | baa8d40 | 2021-12-07 19:44:31 -0800 | [diff] [blame] | 18 | |
| 19 | binaryblobproto_lib = static_library( |
| 20 | 'binaryblob_proto', |
William A. Kennington III | a191c67 | 2022-02-24 10:19:30 -0800 | [diff] [blame] | 21 | src_pb[1], |
Willy Tu | baa8d40 | 2021-12-07 19:44:31 -0800 | [diff] [blame] | 22 | implicit_include_directories: false, |
William A. Kennington III | a191c67 | 2022-02-24 10:19:30 -0800 | [diff] [blame] | 23 | dependencies: binaryblobproto_pre) |
Willy Tu | baa8d40 | 2021-12-07 19:44:31 -0800 | [diff] [blame] | 24 | |
| 25 | binaryblobproto_dep = declare_dependency( |
| 26 | dependencies: binaryblobproto_pre, |
William A. Kennington III | a191c67 | 2022-02-24 10:19:30 -0800 | [diff] [blame] | 27 | link_with: binaryblobproto_lib, |
| 28 | sources: src_pb[0]) |