blob: 21f8421d1b9ad8a2d2444367f9602e0246082993 [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',
Patrick Williams1dfe24e2023-07-12 11:16:02 -050022 'cpp_std=c++23'
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')
Nan Zhou14fe6692021-06-08 16:35:44 -070031
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('.'),
Willy Tubb531612023-07-16 01:30:08 -070057 dependencies: [protobuf, phosphor_dbus_interfaces, sdbusplus, threads, logging],
Nan Zhou14fe6692021-06-08 16:35:44 -070058 install: true
59)
60
61