• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2015 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
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20cc_library_shared {
21    name: "libctscamera2_jni",
22    srcs: [
23        "native-camera-jni.cpp",
24        "dng-validate-jni.cpp",
25        "dynamic-depth-validate-jni.cpp",
26    ],
27    // Flags needed by DNG SDK
28    cflags: [
29        "-DUNIX_ENV=1",
30        "-DqDNGBigEndian=0",
31        "-DqDNGThreadSafe=1",
32        "-DqDNGUseLibJPEG=1",
33        "-DqDNGUseXMP=0",
34        "-DqDNGValidate=1",
35        "-DqDNGValidateTarget=1",
36        "-DqAndroid=1",
37        "-fexceptions",
38        "-Wsign-compare",
39        "-Wno-reorder",
40        "-Wframe-larger-than=20000",
41        // Flags to avoid warnings from DNG SDK
42        "-Wno-unused-parameter",
43        "-Wno-unused-value",
44        "-Wno-unused-variable",
45        // Flags related to dynamic depth
46        "-Wno-ignored-qualifiers",
47        "-DSTATIC_LIBXML=1",
48    ],
49    header_libs: [
50        "jni_headers",
51        "liblog_headers",
52    ],
53    static_libs: [
54        "libdng_sdk_validate",
55        "libjpeg_static_ndk",
56        "libdynamic_depth_ndk",
57        "libimage_io_ndk",
58        "libbase_ndk",
59        "libxml2_ndk",
60    ],
61    // Dynamic depth libraries
62    shared_libs: [
63        "libandroid",
64        "libnativehelper_compat_libc++",
65        "liblog",
66        "libcamera2ndk",
67        "libmediandk",
68        "libz",
69    ],
70    // NDK build, shared C++ runtime
71    sdk_version: "current",
72    stl: "c++_shared",
73}
74