blob: 421469a3b192935ed38734e40c35d9a2d6bba0a5 [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 {
Ronish Kaliab5dd44b2024-02-14 14:32:32 +000020 default_team: "trendy_team_camera_framework",
Bob Badour56786ac2021-02-25 15:24:36 -080021 default_applicable_licenses: ["frameworks_av_camera_ndk_license"],
22}
23
24// Added automatically by a large-scale-change that took the approach of
25// 'apply every license found to every target'. While this makes sure we respect
26// every license restriction, it may not be entirely correct.
27//
28// e.g. GPL in an MIT project might only apply to the contrib/ directory.
29//
30// Please consider splitting the single license below into multiple licenses,
31// taking care not to lose any license_kind information, and overriding the
32// default license using the 'licenses: [...]' property on targets as needed.
33//
34// For unused files, consider creating a 'fileGroup' with "//visibility:private"
35// to attach the license to, and including a comment whether the files may be
36// used in the current project.
37// See: http://go/android-license-faq
38license {
39 name: "frameworks_av_camera_ndk_license",
40 visibility: [":__subpackages__"],
41 license_kinds: [
42 "SPDX-license-identifier-Apache-2.0",
43 "SPDX-license-identifier-MIT",
44 "SPDX-license-identifier-Unicode-DFS",
45 ],
46 license_text: [
47 "NOTICE",
48 ],
49}
50
Dan Albertd7973ba2016-09-14 12:35:50 -070051ndk_library {
Dan Willemsen2c885592017-04-07 15:48:32 -070052 name: "libcamera2ndk",
Dan Albertd7973ba2016-09-14 12:35:50 -070053 symbol_file: "libcamera2ndk.map.txt",
54 first_version: "24",
Dan Albert1714f2e2017-01-05 16:00:15 -080055 unversioned_until: "current",
Dan Albertd7973ba2016-09-14 12:35:50 -070056}
Colin Cross7e8d4ba2017-05-04 16:17:42 -070057
58ndk_headers {
59 name: "libcamera2ndk_headers",
60 from: "include/camera",
61 to: "camera",
62 srcs: ["include/camera/**/*.h"],
63 license: "NOTICE",
64}
Zachary Iqbal096ab362018-10-17 11:02:59 -070065
66cc_library_shared {
dimitryd7e265b2018-11-07 17:12:15 +010067 name: "libcamera2ndk",
Zachary Iqbal096ab362018-10-17 11:02:59 -070068 srcs: [
69 "NdkCameraManager.cpp",
70 "NdkCameraMetadata.cpp",
71 "NdkCameraDevice.cpp",
72 "NdkCaptureRequest.cpp",
73 "NdkCameraCaptureSession.cpp",
74 "impl/ACameraManager.cpp",
75 "impl/ACameraMetadata.cpp",
76 "impl/ACameraDevice.cpp",
77 "impl/ACameraCaptureSession.cpp",
78 ],
79 shared_libs: [
80 "libbinder",
81 "liblog",
82 "libgui",
83 "libutils",
84 "libandroid_runtime",
85 "libcamera_client",
86 "libstagefright_foundation",
87 "libcutils",
88 "libcamera_metadata",
89 "libmediandk",
90 "libnativewindow",
91 ],
Jiawen Chen9f713e82020-01-15 11:06:13 -050092 header_libs: [
93 "jni_headers",
94 ],
Zachary Iqbal096ab362018-10-17 11:02:59 -070095 cflags: [
96 "-fvisibility=hidden",
Jayant Chowdhary8e798a82021-01-29 09:45:47 -080097 "-DEXPORT=__attribute__((visibility(\"default\")))",
Zachary Iqbal096ab362018-10-17 11:02:59 -070098 "-Wall",
99 "-Wextra",
100 "-Werror",
101 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -0700102 // TODO: jchowdhary@, use header_libs instead b/131165718
103 include_dirs: [
104 "system/media/private/camera/include",
105 ],
Zachary Iqbal096ab362018-10-17 11:02:59 -0700106 export_include_dirs: ["include"],
107 export_shared_lib_headers: [
108 "libnativewindow",
dimitry99d67ef2018-11-07 17:09:11 +0100109 ],
110 version_script: "libcamera2ndk.map.txt",
Zachary Iqbal096ab362018-10-17 11:02:59 -0700111}
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800112
113cc_library_shared {
114 name: "libcamera2ndk_vendor",
Tomasz Wasilczyk2048acb2023-11-15 09:17:09 -0800115 cpp_std: "gnu++17",
Zhijun He7c856a22019-05-13 13:43:26 -0700116 vendor: true,
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800117 srcs: [
118 "ndk_vendor/impl/ACameraDevice.cpp",
119 "ndk_vendor/impl/ACameraManager.cpp",
120 "ndk_vendor/impl/utils.cpp",
121 "impl/ACameraMetadata.cpp",
122 "impl/ACameraCaptureSession.cpp",
123 "NdkCameraMetadata.cpp",
124 "NdkCameraCaptureSession.cpp",
125 "NdkCameraManager.cpp",
126 "NdkCameraDevice.cpp",
127 "NdkCaptureRequest.cpp",
128 ],
129
130 export_include_dirs: ["include"],
131 export_shared_lib_headers: [
132 "libcutils",
133 ],
134 local_include_dirs: [
135 ".",
136 "include",
137 "impl",
138 ],
139 cflags: [
140 "-fvisibility=hidden",
141 "-DEXPORT=__attribute__((visibility(\"default\")))",
142 "-D__ANDROID_VNDK__",
143 ],
144
145 shared_libs: [
Avichal Rakeshf099b232022-10-27 15:44:50 -0700146 "libbinder_ndk",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800147 "libfmq",
148 "libhidlbase",
149 "libhardware",
150 "libnativewindow",
151 "liblog",
152 "libutils",
153 "libstagefright_foundation",
154 "libcutils",
155 "libcamera_metadata",
156 "libmediandk",
Avichal Rakeshf099b232022-10-27 15:44:50 -0700157 "android.frameworks.cameraservice.common-V1-ndk",
Avichal Rakesh8effe982023-11-13 18:53:40 -0800158 "android.frameworks.cameraservice.device-V2-ndk",
159 "android.frameworks.cameraservice.service-V2-ndk",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800160 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800161 static_libs: [
162 "android.hardware.camera.common@1.0-helper",
Avichal Rakeshf099b232022-10-27 15:44:50 -0700163 "libaidlcommonsupport",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800164 "libarect",
165 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -0700166 // TODO: jchowdhary@, use header_libs instead b/131165718
167 include_dirs: [
168 "system/media/private/camera/include",
169 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800170}
171
172cc_test {
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800173 name: "ACameraNdkVendorTest",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800174 vendor: true,
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800175 srcs: [
176 "ndk_vendor/tests/AImageReaderVendorTest.cpp",
177 "ndk_vendor/tests/ACameraManagerTest.cpp",
178 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800179 shared_libs: [
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800180 "libcamera2ndk_vendor",
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800181 "libcamera_metadata",
Devin Moore5f866622023-06-05 22:25:40 +0000182 "libhidlbase",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800183 "libmediandk",
184 "libnativewindow",
185 "libutils",
186 "libui",
187 "libcutils",
188 "liblog",
189 ],
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800190 static_libs: [
191 "android.hardware.camera.common@1.0-helper",
192 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800193 cflags: [
194 "-D__ANDROID_VNDK__",
195 ],
196}