Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 1 | // 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 Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 19 | package { |
| 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 |
| 37 | license { |
| 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 Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 50 | ndk_library { |
Dan Willemsen | 2c88559 | 2017-04-07 15:48:32 -0700 | [diff] [blame] | 51 | name: "libcamera2ndk", |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 52 | symbol_file: "libcamera2ndk.map.txt", |
| 53 | first_version: "24", |
Dan Albert | 1714f2e | 2017-01-05 16:00:15 -0800 | [diff] [blame] | 54 | unversioned_until: "current", |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 55 | } |
Colin Cross | 7e8d4ba | 2017-05-04 16:17:42 -0700 | [diff] [blame] | 56 | |
| 57 | ndk_headers { |
| 58 | name: "libcamera2ndk_headers", |
| 59 | from: "include/camera", |
| 60 | to: "camera", |
| 61 | srcs: ["include/camera/**/*.h"], |
| 62 | license: "NOTICE", |
| 63 | } |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 64 | |
| 65 | cc_library_shared { |
dimitry | d7e265b | 2018-11-07 17:12:15 +0100 | [diff] [blame] | 66 | name: "libcamera2ndk", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 67 | 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 Chen | 9f713e8 | 2020-01-15 11:06:13 -0500 | [diff] [blame] | 91 | header_libs: [ |
| 92 | "jni_headers", |
| 93 | ], |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 94 | cflags: [ |
| 95 | "-fvisibility=hidden", |
Jayant Chowdhary | 8e798a8 | 2021-01-29 09:45:47 -0800 | [diff] [blame] | 96 | "-DEXPORT=__attribute__((visibility(\"default\")))", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 97 | "-Wall", |
| 98 | "-Wextra", |
| 99 | "-Werror", |
| 100 | ], |
Jayant Chowdhary | b16194d | 2019-04-19 16:04:01 -0700 | [diff] [blame] | 101 | // TODO: jchowdhary@, use header_libs instead b/131165718 |
| 102 | include_dirs: [ |
| 103 | "system/media/private/camera/include", |
| 104 | ], |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 105 | export_include_dirs: ["include"], |
| 106 | export_shared_lib_headers: [ |
| 107 | "libnativewindow", |
dimitry | 99d67ef | 2018-11-07 17:09:11 +0100 | [diff] [blame] | 108 | ], |
| 109 | version_script: "libcamera2ndk.map.txt", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 110 | } |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 111 | |
| 112 | cc_library_shared { |
| 113 | name: "libcamera2ndk_vendor", |
Zhijun He | 7c856a2 | 2019-05-13 13:43:26 -0700 | [diff] [blame] | 114 | vendor: true, |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 115 | 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 Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 144 | "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", |
Shuzhen Wang | 316781a | 2020-08-18 18:11:01 -0700 | [diff] [blame] | 155 | "android.frameworks.cameraservice.device@2.1", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 156 | "android.frameworks.cameraservice.common@2.0", |
| 157 | "android.frameworks.cameraservice.service@2.0", |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 158 | "android.frameworks.cameraservice.service@2.1", |
Shuzhen Wang | 316781a | 2020-08-18 18:11:01 -0700 | [diff] [blame] | 159 | "android.frameworks.cameraservice.service@2.2", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 160 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 161 | static_libs: [ |
| 162 | "android.hardware.camera.common@1.0-helper", |
| 163 | "libarect", |
| 164 | ], |
Jayant Chowdhary | b16194d | 2019-04-19 16:04:01 -0700 | [diff] [blame] | 165 | // TODO: jchowdhary@, use header_libs instead b/131165718 |
| 166 | include_dirs: [ |
| 167 | "system/media/private/camera/include", |
| 168 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 169 | product_variables: { |
| 170 | pdk: { |
| 171 | enabled: false, |
| 172 | }, |
| 173 | }, |
| 174 | } |
| 175 | |
| 176 | cc_test { |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 177 | name: "ACameraNdkVendorTest", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 178 | vendor: true, |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 179 | srcs: [ |
| 180 | "ndk_vendor/tests/AImageReaderVendorTest.cpp", |
| 181 | "ndk_vendor/tests/ACameraManagerTest.cpp", |
| 182 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 183 | shared_libs: [ |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 184 | "libcamera2ndk_vendor", |
Jayant Chowdhary | 9401b55 | 2019-01-07 16:20:28 -0800 | [diff] [blame] | 185 | "libcamera_metadata", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 186 | "libmediandk", |
| 187 | "libnativewindow", |
| 188 | "libutils", |
| 189 | "libui", |
| 190 | "libcutils", |
| 191 | "liblog", |
| 192 | ], |
Jayant Chowdhary | 9401b55 | 2019-01-07 16:20:28 -0800 | [diff] [blame] | 193 | static_libs: [ |
| 194 | "android.hardware.camera.common@1.0-helper", |
| 195 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 196 | cflags: [ |
| 197 | "-D__ANDROID_VNDK__", |
| 198 | ], |
| 199 | } |