blob: 165395ab850581ea3a7df9aaec3e21a14914e58c [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 Badour56786ac2021-02-25 15:24:36 -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",
Jayant Chowdhary8e798a82021-01-29 09:45:47 -080096 "-DEXPORT=__attribute__((visibility(\"default\")))",
Zachary Iqbal096ab362018-10-17 11:02:59 -070097 "-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",
Tomasz Wasilczyk2048acb2023-11-15 09:17:09 -0800114 cpp_std: "gnu++17",
Zhijun He7c856a22019-05-13 13:43:26 -0700115 vendor: true,
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800116 srcs: [
117 "ndk_vendor/impl/ACameraDevice.cpp",
118 "ndk_vendor/impl/ACameraManager.cpp",
119 "ndk_vendor/impl/utils.cpp",
120 "impl/ACameraMetadata.cpp",
121 "impl/ACameraCaptureSession.cpp",
122 "NdkCameraMetadata.cpp",
123 "NdkCameraCaptureSession.cpp",
124 "NdkCameraManager.cpp",
125 "NdkCameraDevice.cpp",
126 "NdkCaptureRequest.cpp",
127 ],
128
129 export_include_dirs: ["include"],
130 export_shared_lib_headers: [
131 "libcutils",
132 ],
133 local_include_dirs: [
134 ".",
135 "include",
136 "impl",
137 ],
138 cflags: [
139 "-fvisibility=hidden",
140 "-DEXPORT=__attribute__((visibility(\"default\")))",
141 "-D__ANDROID_VNDK__",
142 ],
143
144 shared_libs: [
Avichal Rakeshf099b232022-10-27 15:44:50 -0700145 "libbinder_ndk",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800146 "libfmq",
147 "libhidlbase",
148 "libhardware",
149 "libnativewindow",
150 "liblog",
151 "libutils",
152 "libstagefright_foundation",
153 "libcutils",
154 "libcamera_metadata",
155 "libmediandk",
Avichal Rakeshf099b232022-10-27 15:44:50 -0700156 "android.frameworks.cameraservice.common-V1-ndk",
Avichal Rakesh8effe982023-11-13 18:53:40 -0800157 "android.frameworks.cameraservice.device-V2-ndk",
158 "android.frameworks.cameraservice.service-V2-ndk",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800159 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800160 static_libs: [
161 "android.hardware.camera.common@1.0-helper",
Avichal Rakeshf099b232022-10-27 15:44:50 -0700162 "libaidlcommonsupport",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800163 "libarect",
164 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -0700165 // TODO: jchowdhary@, use header_libs instead b/131165718
166 include_dirs: [
167 "system/media/private/camera/include",
168 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800169}
170
171cc_test {
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800172 name: "ACameraNdkVendorTest",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800173 vendor: true,
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800174 srcs: [
175 "ndk_vendor/tests/AImageReaderVendorTest.cpp",
176 "ndk_vendor/tests/ACameraManagerTest.cpp",
177 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800178 shared_libs: [
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800179 "libcamera2ndk_vendor",
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800180 "libcamera_metadata",
Devin Moore5f866622023-06-05 22:25:40 +0000181 "libhidlbase",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800182 "libmediandk",
183 "libnativewindow",
184 "libutils",
185 "libui",
186 "libcutils",
187 "liblog",
188 ],
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800189 static_libs: [
190 "android.hardware.camera.common@1.0-helper",
191 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800192 cflags: [
193 "-D__ANDROID_VNDK__",
194 ],
195}