• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2017 The Android Open Source Project
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
16package {
17    // See: http://go/android-license-faq
18    // A large-scale-change added 'default_applicable_licenses' to import
19    // all of the 'license_kinds' from "frameworks_native_license"
20    // to get the below license kinds:
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["frameworks_native_license"],
23}
24
25cc_library_headers {
26    name: "libdvr_headers",
27    export_include_dirs: ["include"],
28    vendor_available: true,
29    apex_available: [
30        "//apex_available:platform",
31        "com.android.media",
32        "com.android.media.swcodec",
33    ],
34    min_sdk_version: "29",
35}
36
37cc_library_headers {
38    name: "libdvr_private_headers",
39    export_include_dirs: ["."],
40    vendor_available: false,
41}
42
43cflags = [
44    "-DDVR_TRACKING_IMPLEMENTED=0",
45    "-DLOG_TAG=\"libdvr\"",
46    "-DTRACE=0",
47    "-Wall",
48    "-Werror",
49]
50
51srcs = [
52    "dvr_api.cpp",
53    "dvr_buffer.cpp",
54    "dvr_buffer_queue.cpp",
55    "dvr_configuration_data.cpp",
56    "dvr_display_manager.cpp",
57    "dvr_hardware_composer_client.cpp",
58    "dvr_performance.cpp",
59    "dvr_pose.cpp",
60    "dvr_surface.cpp",
61    "dvr_tracking.cpp",
62]
63
64static_libs = [
65    "libbroadcastring",
66    "libvrsensor",
67    "libdisplay",
68    "libvirtualtouchpadclient",
69    "libvr_hwc-impl",
70    "libvr_hwc-binder",
71    "libgrallocusage",
72    "libperformance",
73]
74
75shared_libs = [
76    "android.hardware.graphics.bufferqueue@1.0",
77    "android.hidl.token@1.0-utils",
78    "libbase",
79    "libbufferhubqueue",
80    "libbinder",
81    "liblog",
82    "libcutils",
83    "libutils",
84    "libnativewindow",
85    "libgui",
86    "libui",
87    "libpdx_default_transport",
88]
89
90cc_library_shared {
91    name: "libdvr.google",
92    system_ext_specific: true,
93    owner: "google",
94    cflags: cflags,
95    header_libs: ["libdvr_headers"],
96    export_header_lib_headers: ["libdvr_headers"],
97    srcs: srcs,
98    static_libs: static_libs,
99    shared_libs: shared_libs,
100    version_script: "exported_apis.lds",
101}
102
103// Also build a static libdvr for linking into tests. The linker script
104// restricting function access in the shared lib makes it inconvenient to use in
105// test code.
106cc_library_static {
107    name: "libdvr_static.google",
108    owner: "google",
109    cflags: cflags,
110    header_libs: ["libdvr_headers"],
111    export_header_lib_headers: ["libdvr_headers"],
112    srcs: srcs,
113    static_libs: static_libs,
114    shared_libs: shared_libs,
115}
116
117subdirs = [
118    "tests",
119]
120