blob: 56f209c5a9e09cb2eb0a0e500271cd23de164ba9 [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
19ndk_library {
Dan Willemsen2c885592017-04-07 15:48:32 -070020 name: "libcamera2ndk",
Dan Albertd7973ba2016-09-14 12:35:50 -070021 symbol_file: "libcamera2ndk.map.txt",
22 first_version: "24",
Dan Albert1714f2e2017-01-05 16:00:15 -080023 unversioned_until: "current",
Dan Albertd7973ba2016-09-14 12:35:50 -070024}
Colin Cross7e8d4ba2017-05-04 16:17:42 -070025
26ndk_headers {
27 name: "libcamera2ndk_headers",
28 from: "include/camera",
29 to: "camera",
30 srcs: ["include/camera/**/*.h"],
31 license: "NOTICE",
32}
Zachary Iqbal096ab362018-10-17 11:02:59 -070033
34cc_library_shared {
dimitryd7e265b2018-11-07 17:12:15 +010035 name: "libcamera2ndk",
Zachary Iqbal096ab362018-10-17 11:02:59 -070036 srcs: [
37 "NdkCameraManager.cpp",
38 "NdkCameraMetadata.cpp",
39 "NdkCameraDevice.cpp",
40 "NdkCaptureRequest.cpp",
41 "NdkCameraCaptureSession.cpp",
42 "impl/ACameraManager.cpp",
43 "impl/ACameraMetadata.cpp",
44 "impl/ACameraDevice.cpp",
45 "impl/ACameraCaptureSession.cpp",
46 ],
47 shared_libs: [
48 "libbinder",
49 "liblog",
50 "libgui",
51 "libutils",
52 "libandroid_runtime",
53 "libcamera_client",
54 "libstagefright_foundation",
55 "libcutils",
56 "libcamera_metadata",
57 "libmediandk",
58 "libnativewindow",
59 ],
Jiawen Chen9f713e82020-01-15 11:06:13 -050060 header_libs: [
61 "jni_headers",
62 ],
Zachary Iqbal096ab362018-10-17 11:02:59 -070063 cflags: [
64 "-fvisibility=hidden",
65 "-DEXPORT=__attribute__ ((visibility (\"default\")))",
66 "-Wall",
67 "-Wextra",
68 "-Werror",
69 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -070070 // TODO: jchowdhary@, use header_libs instead b/131165718
71 include_dirs: [
72 "system/media/private/camera/include",
73 ],
Zachary Iqbal096ab362018-10-17 11:02:59 -070074 export_include_dirs: ["include"],
75 export_shared_lib_headers: [
76 "libnativewindow",
dimitry99d67ef2018-11-07 17:09:11 +010077 ],
78 version_script: "libcamera2ndk.map.txt",
Zachary Iqbal096ab362018-10-17 11:02:59 -070079}
Jayant Chowdhary6df26072018-11-06 23:55:12 -080080
81cc_library_shared {
82 name: "libcamera2ndk_vendor",
Zhijun He7c856a22019-05-13 13:43:26 -070083 vendor: true,
Jayant Chowdhary6df26072018-11-06 23:55:12 -080084 srcs: [
85 "ndk_vendor/impl/ACameraDevice.cpp",
86 "ndk_vendor/impl/ACameraManager.cpp",
87 "ndk_vendor/impl/utils.cpp",
88 "impl/ACameraMetadata.cpp",
89 "impl/ACameraCaptureSession.cpp",
90 "NdkCameraMetadata.cpp",
91 "NdkCameraCaptureSession.cpp",
92 "NdkCameraManager.cpp",
93 "NdkCameraDevice.cpp",
94 "NdkCaptureRequest.cpp",
95 ],
96
97 export_include_dirs: ["include"],
98 export_shared_lib_headers: [
99 "libcutils",
100 ],
101 local_include_dirs: [
102 ".",
103 "include",
104 "impl",
105 ],
106 cflags: [
107 "-fvisibility=hidden",
108 "-DEXPORT=__attribute__((visibility(\"default\")))",
109 "-D__ANDROID_VNDK__",
110 ],
111
112 shared_libs: [
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800113 "libfmq",
114 "libhidlbase",
115 "libhardware",
116 "libnativewindow",
117 "liblog",
118 "libutils",
119 "libstagefright_foundation",
120 "libcutils",
121 "libcamera_metadata",
122 "libmediandk",
123 "android.frameworks.cameraservice.device@2.0",
124 "android.frameworks.cameraservice.common@2.0",
125 "android.frameworks.cameraservice.service@2.0",
126 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800127 static_libs: [
128 "android.hardware.camera.common@1.0-helper",
129 "libarect",
130 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -0700131 // TODO: jchowdhary@, use header_libs instead b/131165718
132 include_dirs: [
133 "system/media/private/camera/include",
134 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800135 product_variables: {
136 pdk: {
137 enabled: false,
138 },
139 },
140}
141
142cc_test {
143 name: "AImageReaderVendorTest",
144 vendor: true,
145 srcs: ["ndk_vendor/tests/AImageReaderVendorTest.cpp"],
146 shared_libs: [
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800147 "libcamera2ndk_vendor",
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800148 "libcamera_metadata",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800149 "libmediandk",
150 "libnativewindow",
151 "libutils",
152 "libui",
153 "libcutils",
154 "liblog",
155 ],
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800156 static_libs: [
157 "android.hardware.camera.common@1.0-helper",
158 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800159 cflags: [
160 "-D__ANDROID_VNDK__",
161 ],
162}