blob: 24eaba65e7e14da80b762db5838df4cd245a07be [file] [log] [blame]
Dan Albertd7973ba2016-09-14 12:35:50 -07001// Copyright (C) 2016 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// Headers module is in frameworks/av/Android.bp because modules are not allowed
16// to refer to headers in parent directories and the headers live in
17// frameworks/av/include.
18
Bob Badour948e6aa2021-02-12 21:02:31 -080019package {
20 default_applicable_licenses: ["frameworks_av_camera_ndk_license"],
21}
22
23// Added automatically by a large-scale-change that took the approach of
24// 'apply every license found to every target'. While this makes sure we respect
25// every license restriction, it may not be entirely correct.
26//
27// e.g. GPL in an MIT project might only apply to the contrib/ directory.
28//
29// Please consider splitting the single license below into multiple licenses,
30// taking care not to lose any license_kind information, and overriding the
31// default license using the 'licenses: [...]' property on targets as needed.
32//
33// For unused files, consider creating a 'fileGroup' with "//visibility:private"
34// to attach the license to, and including a comment whether the files may be
35// used in the current project.
36// See: http://go/android-license-faq
37license {
38 name: "frameworks_av_camera_ndk_license",
39 visibility: [":__subpackages__"],
40 license_kinds: [
41 "SPDX-license-identifier-Apache-2.0",
42 "SPDX-license-identifier-MIT",
43 "SPDX-license-identifier-Unicode-DFS",
44 ],
45 license_text: [
46 "NOTICE",
47 ],
48}
49
Dan Albertd7973ba2016-09-14 12:35:50 -070050ndk_library {
Dan Willemsen2c885592017-04-07 15:48:32 -070051 name: "libcamera2ndk",
Dan Albertd7973ba2016-09-14 12:35:50 -070052 symbol_file: "libcamera2ndk.map.txt",
53 first_version: "24",
Dan Albert1714f2e2017-01-05 16:00:15 -080054 unversioned_until: "current",
Dan Albertd7973ba2016-09-14 12:35:50 -070055}
Colin Cross7e8d4ba2017-05-04 16:17:42 -070056
57ndk_headers {
58 name: "libcamera2ndk_headers",
59 from: "include/camera",
60 to: "camera",
61 srcs: ["include/camera/**/*.h"],
62 license: "NOTICE",
63}
Zachary Iqbal096ab362018-10-17 11:02:59 -070064
65cc_library_shared {
dimitryd7e265b2018-11-07 17:12:15 +010066 name: "libcamera2ndk",
Zachary Iqbal096ab362018-10-17 11:02:59 -070067 srcs: [
68 "NdkCameraManager.cpp",
69 "NdkCameraMetadata.cpp",
70 "NdkCameraDevice.cpp",
71 "NdkCaptureRequest.cpp",
72 "NdkCameraCaptureSession.cpp",
73 "impl/ACameraManager.cpp",
74 "impl/ACameraMetadata.cpp",
75 "impl/ACameraDevice.cpp",
76 "impl/ACameraCaptureSession.cpp",
77 ],
78 shared_libs: [
79 "libbinder",
80 "liblog",
81 "libgui",
82 "libutils",
83 "libandroid_runtime",
84 "libcamera_client",
85 "libstagefright_foundation",
86 "libcutils",
87 "libcamera_metadata",
88 "libmediandk",
89 "libnativewindow",
90 ],
Jiawen Chen9f713e82020-01-15 11:06:13 -050091 header_libs: [
92 "jni_headers",
93 ],
Zachary Iqbal096ab362018-10-17 11:02:59 -070094 cflags: [
95 "-fvisibility=hidden",
96 "-DEXPORT=__attribute__ ((visibility (\"default\")))",
97 "-Wall",
98 "-Wextra",
99 "-Werror",
100 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -0700101 // TODO: jchowdhary@, use header_libs instead b/131165718
102 include_dirs: [
103 "system/media/private/camera/include",
104 ],
Zachary Iqbal096ab362018-10-17 11:02:59 -0700105 export_include_dirs: ["include"],
106 export_shared_lib_headers: [
107 "libnativewindow",
dimitry99d67ef2018-11-07 17:09:11 +0100108 ],
109 version_script: "libcamera2ndk.map.txt",
Zachary Iqbal096ab362018-10-17 11:02:59 -0700110}
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800111
112cc_library_shared {
113 name: "libcamera2ndk_vendor",
Zhijun He7c856a22019-05-13 13:43:26 -0700114 vendor: true,
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800115 srcs: [
116 "ndk_vendor/impl/ACameraDevice.cpp",
117 "ndk_vendor/impl/ACameraManager.cpp",
118 "ndk_vendor/impl/utils.cpp",
119 "impl/ACameraMetadata.cpp",
120 "impl/ACameraCaptureSession.cpp",
121 "NdkCameraMetadata.cpp",
122 "NdkCameraCaptureSession.cpp",
123 "NdkCameraManager.cpp",
124 "NdkCameraDevice.cpp",
125 "NdkCaptureRequest.cpp",
126 ],
127
128 export_include_dirs: ["include"],
129 export_shared_lib_headers: [
130 "libcutils",
131 ],
132 local_include_dirs: [
133 ".",
134 "include",
135 "impl",
136 ],
137 cflags: [
138 "-fvisibility=hidden",
139 "-DEXPORT=__attribute__((visibility(\"default\")))",
140 "-D__ANDROID_VNDK__",
141 ],
142
143 shared_libs: [
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800144 "libfmq",
145 "libhidlbase",
146 "libhardware",
147 "libnativewindow",
148 "liblog",
149 "libutils",
150 "libstagefright_foundation",
151 "libcutils",
152 "libcamera_metadata",
153 "libmediandk",
154 "android.frameworks.cameraservice.device@2.0",
155 "android.frameworks.cameraservice.common@2.0",
156 "android.frameworks.cameraservice.service@2.0",
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800157 "android.frameworks.cameraservice.service@2.1",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800158 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800159 static_libs: [
160 "android.hardware.camera.common@1.0-helper",
161 "libarect",
162 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -0700163 // TODO: jchowdhary@, use header_libs instead b/131165718
164 include_dirs: [
165 "system/media/private/camera/include",
166 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800167 product_variables: {
168 pdk: {
169 enabled: false,
170 },
171 },
172}
173
174cc_test {
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800175 name: "ACameraNdkVendorTest",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800176 vendor: true,
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800177 srcs: [
178 "ndk_vendor/tests/AImageReaderVendorTest.cpp",
179 "ndk_vendor/tests/ACameraManagerTest.cpp",
180 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800181 shared_libs: [
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800182 "libcamera2ndk_vendor",
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800183 "libcamera_metadata",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800184 "libmediandk",
185 "libnativewindow",
186 "libutils",
187 "libui",
188 "libcutils",
189 "liblog",
190 ],
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800191 static_libs: [
192 "android.hardware.camera.common@1.0-helper",
193 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800194 cflags: [
195 "-D__ANDROID_VNDK__",
196 ],
197}