blob: 60c9f851b811f5b992ed48067c76c870d7af1fd0 [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 ],
60 cflags: [
61 "-fvisibility=hidden",
62 "-DEXPORT=__attribute__ ((visibility (\"default\")))",
63 "-Wall",
64 "-Wextra",
65 "-Werror",
66 ],
67 export_include_dirs: ["include"],
68 export_shared_lib_headers: [
69 "libnativewindow",
dimitry99d67ef2018-11-07 17:09:11 +010070 ],
71 version_script: "libcamera2ndk.map.txt",
Zachary Iqbal096ab362018-10-17 11:02:59 -070072}
Jayant Chowdhary6df26072018-11-06 23:55:12 -080073
74cc_library_shared {
75 name: "libcamera2ndk_vendor",
76 vendor_available: true,
77 srcs: [
78 "ndk_vendor/impl/ACameraDevice.cpp",
79 "ndk_vendor/impl/ACameraManager.cpp",
80 "ndk_vendor/impl/utils.cpp",
81 "impl/ACameraMetadata.cpp",
82 "impl/ACameraCaptureSession.cpp",
83 "NdkCameraMetadata.cpp",
84 "NdkCameraCaptureSession.cpp",
85 "NdkCameraManager.cpp",
86 "NdkCameraDevice.cpp",
87 "NdkCaptureRequest.cpp",
88 ],
89
90 export_include_dirs: ["include"],
91 export_shared_lib_headers: [
92 "libcutils",
93 ],
94 local_include_dirs: [
95 ".",
96 "include",
97 "impl",
98 ],
99 cflags: [
100 "-fvisibility=hidden",
101 "-DEXPORT=__attribute__((visibility(\"default\")))",
102 "-D__ANDROID_VNDK__",
103 ],
104
105 shared_libs: [
106 "libhwbinder",
107 "libfmq",
108 "libhidlbase",
109 "libhardware",
110 "libnativewindow",
111 "liblog",
112 "libutils",
113 "libstagefright_foundation",
114 "libcutils",
115 "libcamera_metadata",
116 "libmediandk",
117 "android.frameworks.cameraservice.device@2.0",
118 "android.frameworks.cameraservice.common@2.0",
119 "android.frameworks.cameraservice.service@2.0",
120 ],
121
122 static_libs: [
123 "android.hardware.camera.common@1.0-helper",
124 "libarect",
125 ],
126 product_variables: {
127 pdk: {
128 enabled: false,
129 },
130 },
131}
132
133cc_test {
134 name: "AImageReaderVendorTest",
135 vendor: true,
136 srcs: ["ndk_vendor/tests/AImageReaderVendorTest.cpp"],
137 shared_libs: [
138 "libhwbinder",
139 "libcamera2ndk_vendor",
140 "libmediandk",
141 "libnativewindow",
142 "libutils",
143 "libui",
144 "libcutils",
145 "liblog",
146 ],
147 cflags: [
148 "-D__ANDROID_VNDK__",
149 ],
150}