blob: 487b7c0d1c2a9897182d7287afd801b997536a55 [file] [log] [blame]
Nan Zhou14fe6692021-06-08 16:35:44 -07001# 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',
Willy Tu382d6282021-10-21 13:31:14 -070022 'cpp_std=c++20'
Nan Zhou14fe6692021-06-08 16:35:44 -070023 ],
24)
25
26protobuf = dependency('protobuf')
27phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
28sdbusplus = dependency('sdbusplus')
29threads = dependency('threads')
30logging = dependency('phosphor-logging')
31fmt = declare_dependency(compile_args: '-DFMT_STRING_ALIAS=1', dependencies: dependency('fmt'))
32
33protoc = find_program('protoc', native: true)
34
35proto = 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
49executable(
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