xref: /aosp_15_r20/external/pigweed/pw_router/CMakeLists.txt (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2021 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://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, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
16
17pw_add_library(pw_router.static_router STATIC
18  HEADERS
19    public/pw_router/static_router.h
20  PUBLIC_INCLUDES
21    public
22  PUBLIC_DEPS
23    pw_metric
24    pw_router.egress
25    pw_router.packet_parser
26    pw_span
27  SOURCES
28    static_router.cc
29  PRIVATE_DEPS
30    pw_log
31)
32
33pw_add_library(pw_router.egress INTERFACE
34  HEADERS
35    public/pw_router/egress.h
36  PUBLIC_INCLUDES
37    public
38  PUBLIC_DEPS
39    pw_bytes
40    pw_router.packet_parser
41    pw_span
42)
43
44pw_add_library(pw_router.packet_parser INTERFACE
45  HEADERS
46    public/pw_router/packet_parser.h
47  PUBLIC_INCLUDES
48    public
49  PUBLIC_DEPS
50    pw_bytes
51    pw_span
52)
53
54pw_add_library(pw_router.egress_function INTERFACE
55  HEADERS
56    public/pw_router/egress_function.h
57  PUBLIC_INCLUDES
58    public
59  PUBLIC_DEPS
60    pw_function
61    pw_router.egress
62    pw_span
63)
64
65pw_add_test(pw_router.static_router_test
66  SOURCES
67    static_router_test.cc
68  PRIVATE_DEPS
69    pw_router.egress_function
70    pw_router.static_router
71  GROUPS
72    modules
73    pw_router
74)
75