Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / ot-br-posix / BUILD.gn
1 # Copyright (c) 2020 Project CHIP Authors
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
15 import("//build_overrides/build.gni")
16 import("//build_overrides/chip.gni")
17
18 import("${build_root}/config/linux/pkg_config.gni")
19
20 config("ot_br_client_config") {
21   # Treat these includes as system includes, so warnings in them are not fatal.
22   _include_dirs = [
23     "repo/src",
24     "repo/include",
25   ]
26
27   cflags = []
28   foreach(include_dir, _include_dirs) {
29     cflags += [ "-isystem" + rebase_path(include_dir, root_build_dir) ]
30   }
31 }
32
33 pkg_config("dbus_config") {
34   packages = [ "dbus-1" ]
35 }
36
37 static_library("ot_br_client") {
38   output_name = "libot_br_client"
39
40   sources = [
41     "repo/src/dbus/client/client_error.cpp",
42     "repo/src/dbus/client/thread_api_dbus.cpp",
43     "repo/src/dbus/common/dbus_message_helper.cpp",
44     "repo/src/dbus/common/dbus_message_helper_openthread.cpp",
45     "repo/src/dbus/common/error.cpp",
46   ]
47
48   public_configs = [
49     ":ot_br_client_config",
50     ":dbus_config",
51   ]
52 }