OSDN Git Service

47604a9f44eb27d8a14b37638f886a5d29be3d87
[android-x86/system-bt.git] / types / BUILD.gn
1 #
2 #  Copyright 2017 Google, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at:
7 #
8 #  http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #
16
17 static_library("types") {
18   cflags = [
19      "-fvisibility=default",
20   ]
21
22   sources = [
23     "class_of_device.cc",
24     "bluetooth/uuid.cc",
25     "raw_address.cc",
26   ]
27
28   include_dirs = [
29     "//bt/",
30   ]
31
32   configs += [
33     "//bt:target_defaults",
34   ]
35 }
36
37 if (use.test) {
38   executable("net_test_types") {
39     sources = [
40       "test/class_of_device_unittest.cc",
41       "test/raw_address_unittest.cc",
42       "test/bluetooth/uuid_unittest.cc",
43     ]
44
45     include_dirs = [
46       "//bt/",
47     ]
48
49     libs = [
50       "dl",
51       "pthread",
52       "resolv",
53       "rt",
54       "z",
55     ]
56
57     deps = [
58       ":types",
59     ]
60
61     configs += [
62       "//bt:external_gmock_main",
63       "//bt:target_defaults",
64     ]
65   }
66 }