• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2#  Copyright (c) 2021, The OpenThread Authors.
3#  All rights reserved.
4#
5#  Redistribution and use in source and binary forms, with or without
6#  modification, are permitted provided that the following conditions are met:
7#  1. Redistributions of source code must retain the above copyright
8#     notice, this list of conditions and the following disclaimer.
9#  2. Redistributions in binary form must reproduce the above copyright
10#     notice, this list of conditions and the following disclaimer in the
11#     documentation and/or other materials provided with the distribution.
12#  3. Neither the name of the copyright holder nor the
13#     names of its contributors may be used to endorse or promote products
14#     derived from this software without specific prior written permission.
15#
16#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26#  POSSIBILITY OF SUCH DAMAGE.
27#
28
29find_package(PkgConfig)
30
31option(OTBR_DOC "Build documentation" OFF)
32
33option(OTBR_BORDER_AGENT "Enable Border Agent" ON)
34if (OTBR_BORDER_AGENT)
35    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_BORDER_AGENT=1)
36endif()
37
38option(OTBR_BACKBONE_ROUTER "Enable Backbone Router" OFF)
39if (OTBR_BACKBONE_ROUTER)
40    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_BACKBONE_ROUTER=1)
41endif()
42
43option(OTBR_BORDER_ROUTING "Enable Border Routing Manager" OFF)
44
45option(OTBR_BORDER_ROUTING_NAT64 "Enable NAT64 support in Border Routing Manager" OFF)
46
47option(OTBR_DBUS "Enable DBus support" OFF)
48if(OTBR_DBUS)
49    pkg_check_modules(DBUS REQUIRED dbus-1)
50    pkg_get_variable(OTBR_DBUS_SYSTEM_BUS_SERVICES_DIR dbus-1 system_bus_services_dir)
51    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_DBUS_SERVER=1)
52endif()
53
54option(OTBR_DUA_ROUTING "Enable Backbone Router DUA Routing" OFF)
55if (OTBR_DUA_ROUTING)
56    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_DUA_ROUTING=1)
57endif()
58
59option(OTBR_OPENWRT "Enable OpenWrt support" OFF)
60if(OTBR_OPENWRT)
61    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_OPENWRT=1)
62endif()
63
64option(OTBR_REST "Enable Rest Server" OFF)
65if(OTBR_REST)
66    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_REST_SERVER=1)
67endif()
68
69option(OTBR_SRP_ADVERTISING_PROXY "Enable Advertising Proxy" OFF)
70if (OTBR_SRP_ADVERTISING_PROXY)
71    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_SRP_ADVERTISING_PROXY=1)
72endif()
73
74option(OTBR_DNSSD_DISCOVERY_PROXY   "Enable DNS-SD Discovery Proxy support" OFF)
75if (OTBR_DNSSD_DISCOVERY_PROXY)
76    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_DNSSD_DISCOVERY_PROXY=1)
77endif()
78
79option(OTBR_UNSECURE_JOIN "Enable unsecure joining" OFF)
80if(OTBR_UNSECURE_JOIN)
81    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_UNSECURE_JOIN=1)
82endif()
83
84option(OTBR_TREL "Enable TREL link support." OFF)
85if(OTBR_TREL)
86    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_TREL=1)
87endif()
88
89
90option(OTBR_WEB "Enable Web GUI" OFF)
91
92option(OTBR_NOTIFY_UPSTART "Notify upstart when ready." ON)
93if(OTBR_NOTIFY_UPSTART)
94    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_NOTIFY_UPSTART=1)
95endif()
96
97option(OTBR_VENDOR_INFRA_LINK_SELECT "Enable Vendor-specific infrastructure link selection rules" OFF)
98if(OTBR_VENDOR_INFRA_LINK_SELECT)
99    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_VENDOR_INFRA_LINK_SELECT=1)
100else()
101    target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_VENDOR_INFRA_LINK_SELECT=0)
102endif()
103