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
15project(
16  'nemora-postd',
17  'cpp',
18  version: '0.1',
19  default_options: [
20    'warning_level=3',
21    'werror=true',
22    'cpp_std=c++23'
23  ],
24)
25
26protobuf = dependency('protobuf')
27phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
28sdbusplus = dependency('sdbusplus')
29threads = dependency('threads')
30logging = dependency('phosphor-logging')
31
32protoc = find_program('protoc', native: true)
33
34proto = custom_target(
35  'event_message_proto',
36  command: [
37    find_program('protoc', native: true),
38    '--proto_path=@CURRENT_SOURCE_DIR@',
39    '--cpp_out=@OUTDIR@',
40    '@INPUT@'
41  ],
42  output: [
43    'event_message.pb.cc',
44    'event_message.pb.h',
45  ],
46  input: 'event_message.proto')
47
48executable(
49  'nemora-postd',
50  'nemorad.cpp',
51  'src/host_manager.cpp',
52  'src/nemora.cpp',
53  'src/socket_manager.cpp',
54  'src/serializer.cpp',
55  proto,
56  include_directories: include_directories('.'),
57  dependencies: [protobuf, phosphor_dbus_interfaces, sdbusplus, threads, logging],
58  install: true
59)
60
61
62