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 { |
Ronish Kalia | b5dd44b | 2024-02-14 14:32:32 +0000 | [diff] [blame^] | 20 | default_team: "trendy_team_camera_framework", |
Bob Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 21 | 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 |
| 38 | license { |
| 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 Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 51 | ndk_library { |
Dan Willemsen | 2c88559 | 2017-04-07 15:48:32 -0700 | [diff] [blame] | 52 | name: "libcamera2ndk", |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 53 | symbol_file: "libcamera2ndk.map.txt", |
| 54 | first_version: "24", |
Dan Albert | 1714f2e | 2017-01-05 16:00:15 -0800 | [diff] [blame] | 55 | unversioned_until: "current", |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 56 | } |
Colin Cross | 7e8d4ba | 2017-05-04 16:17:42 -0700 | [diff] [blame] | 57 | |
| 58 | ndk_headers { |
| 59 | name: "libcamera2ndk_headers", |
| 60 | from: "include/camera", |
| 61 | to: "camera", |
| 62 | srcs: ["include/camera/**/*.h"], |
| 63 | license: "NOTICE", |
| 64 | } |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 65 | |
| 66 | cc_library_shared { |
dimitry | d7e265b | 2018-11-07 17:12:15 +0100 | [diff] [blame] | 67 | name: "libcamera2ndk", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 68 | 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 Chen | 9f713e8 | 2020-01-15 11:06:13 -0500 | [diff] [blame] | 92 | header_libs: [ |
| 93 | "jni_headers", |
| 94 | ], |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 95 | cflags: [ |
| 96 | "-fvisibility=hidden", |
Jayant Chowdhary | 8e798a8 | 2021-01-29 09:45:47 -0800 | [diff] [blame] | 97 | "-DEXPORT=__attribute__((visibility(\"default\")))", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 98 | "-Wall", |
| 99 | "-Wextra", |
| 100 | "-Werror", |
| 101 | ], |
Jayant Chowdhary | b16194d | 2019-04-19 16:04:01 -0700 | [diff] [blame] | 102 | // TODO: jchowdhary@, use header_libs instead b/131165718 |
| 103 | include_dirs: [ |
| 104 | "system/media/private/camera/include", |
| 105 | ], |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 106 | export_include_dirs: ["include"], |
| 107 | export_shared_lib_headers: [ |
| 108 | "libnativewindow", |
dimitry | 99d67ef | 2018-11-07 17:09:11 +0100 | [diff] [blame] | 109 | ], |
| 110 | version_script: "libcamera2ndk.map.txt", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 111 | } |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 112 | |
| 113 | cc_library_shared { |
| 114 | name: "libcamera2ndk_vendor", |
Tomasz Wasilczyk | 2048acb | 2023-11-15 09:17:09 -0800 | [diff] [blame] | 115 | cpp_std: "gnu++17", |
Zhijun He | 7c856a2 | 2019-05-13 13:43:26 -0700 | [diff] [blame] | 116 | vendor: true, |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 117 | 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 Rakesh | f099b23 | 2022-10-27 15:44:50 -0700 | [diff] [blame] | 146 | "libbinder_ndk", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 147 | "libfmq", |
| 148 | "libhidlbase", |
| 149 | "libhardware", |
| 150 | "libnativewindow", |
| 151 | "liblog", |
| 152 | "libutils", |
| 153 | "libstagefright_foundation", |
| 154 | "libcutils", |
| 155 | "libcamera_metadata", |
| 156 | "libmediandk", |
Avichal Rakesh | f099b23 | 2022-10-27 15:44:50 -0700 | [diff] [blame] | 157 | "android.frameworks.cameraservice.common-V1-ndk", |
Avichal Rakesh | 8effe98 | 2023-11-13 18:53:40 -0800 | [diff] [blame] | 158 | "android.frameworks.cameraservice.device-V2-ndk", |
| 159 | "android.frameworks.cameraservice.service-V2-ndk", |
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", |
Avichal Rakesh | f099b23 | 2022-10-27 15:44:50 -0700 | [diff] [blame] | 163 | "libaidlcommonsupport", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 164 | "libarect", |
| 165 | ], |
Jayant Chowdhary | b16194d | 2019-04-19 16:04:01 -0700 | [diff] [blame] | 166 | // TODO: jchowdhary@, use header_libs instead b/131165718 |
| 167 | include_dirs: [ |
| 168 | "system/media/private/camera/include", |
| 169 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | cc_test { |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 173 | name: "ACameraNdkVendorTest", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 174 | vendor: true, |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 175 | srcs: [ |
| 176 | "ndk_vendor/tests/AImageReaderVendorTest.cpp", |
| 177 | "ndk_vendor/tests/ACameraManagerTest.cpp", |
| 178 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 179 | shared_libs: [ |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 180 | "libcamera2ndk_vendor", |
Jayant Chowdhary | 9401b55 | 2019-01-07 16:20:28 -0800 | [diff] [blame] | 181 | "libcamera_metadata", |
Devin Moore | 5f86662 | 2023-06-05 22:25:40 +0000 | [diff] [blame] | 182 | "libhidlbase", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 183 | "libmediandk", |
| 184 | "libnativewindow", |
| 185 | "libutils", |
| 186 | "libui", |
| 187 | "libcutils", |
| 188 | "liblog", |
| 189 | ], |
Jayant Chowdhary | 9401b55 | 2019-01-07 16:20:28 -0800 | [diff] [blame] | 190 | static_libs: [ |
| 191 | "android.hardware.camera.common@1.0-helper", |
| 192 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 193 | cflags: [ |
| 194 | "-D__ANDROID_VNDK__", |
| 195 | ], |
| 196 | } |