Nan Zhou | 14fe669 | 2021-06-08 16:35:44 -0700 | [diff] [blame] | 1 | # Copyright 2021 Google LLC |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | project( |
| 16 | 'nemora-postd', |
| 17 | 'cpp', |
| 18 | version: '0.1', |
| 19 | default_options: [ |
| 20 | 'warning_level=3', |
| 21 | 'werror=true', |
Willy Tu | 382d628 | 2021-10-21 13:31:14 -0700 | [diff] [blame^] | 22 | 'cpp_std=c++20' |
Nan Zhou | 14fe669 | 2021-06-08 16:35:44 -0700 | [diff] [blame] | 23 | ], |
| 24 | ) |
| 25 | |
| 26 | protobuf = dependency('protobuf') |
| 27 | phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces') |
| 28 | sdbusplus = dependency('sdbusplus') |
| 29 | threads = dependency('threads') |
| 30 | logging = dependency('phosphor-logging') |
| 31 | fmt = declare_dependency(compile_args: '-DFMT_STRING_ALIAS=1', dependencies: dependency('fmt')) |
| 32 | |
| 33 | protoc = find_program('protoc', native: true) |
| 34 | |
| 35 | proto = custom_target( |
| 36 | 'event_message_proto', |
| 37 | command: [ |
| 38 | find_program('protoc', native: true), |
| 39 | '--proto_path=@CURRENT_SOURCE_DIR@', |
| 40 | '--cpp_out=@OUTDIR@', |
| 41 | '@INPUT@' |
| 42 | ], |
| 43 | output: [ |
| 44 | 'event_message.pb.cc', |
| 45 | 'event_message.pb.h', |
| 46 | ], |
| 47 | input: 'event_message.proto') |
| 48 | |
| 49 | executable( |
| 50 | 'nemora-postd', |
| 51 | 'nemorad.cpp', |
| 52 | 'src/host_manager.cpp', |
| 53 | 'src/nemora.cpp', |
| 54 | 'src/socket_manager.cpp', |
| 55 | 'src/serializer.cpp', |
| 56 | proto, |
| 57 | include_directories: include_directories('.'), |
| 58 | dependencies: [protobuf, phosphor_dbus_interfaces, sdbusplus, threads, logging, fmt], |
| 59 | install: true |
| 60 | ) |
| 61 | |
| 62 | |