1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    // See: http://go/android-license-faq
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22soong_config_module_type_import {
23    from: "hardware/google/camera/common/hal/Android.bp",
24    module_types: ["gch_hal_cc_defaults"],
25}
26
27gch_hal_cc_defaults {
28    name: "gch_hwl_linking_cc_defaults",
29    soong_config_variables: {
30        hwl_library: {
31            lyric: {
32                shared_libs: ["//vendor/google/services/LyricCameraHAL/src:liblyric_hwl"],
33            },
34            conditions_default: {
35                cflags: ["-DGCH_HWL_USE_DLOPEN=1"],
36            },
37        },
38    },
39}
40
41cc_library_shared {
42    name: "libgooglecamerahal",
43    defaults: [
44        "google_camera_hal_defaults",
45        "gch_hwl_linking_cc_defaults",
46    ],
47    owner: "google",
48    vendor: true,
49    compile_multilib: "first",
50    ldflags: [
51        "-Wl,--rpath,/system/${LIB}/camera/capture_sessions",
52        "-Wl,--rpath,/vendor/${LIB}/camera/capture_sessions",
53    ],
54    srcs: [
55        "basic_capture_session.cc",
56        "basic_request_processor.cc",
57        "basic_result_processor.cc",
58        "camera_device.cc",
59        "camera_device_session.cc",
60        "camera_provider.cc",
61        "capture_session_utils.cc",
62        "capture_session_wrapper_process_block.cc",
63        "depth_process_block.cc",
64        "dual_ir_capture_session.cc",
65        "dual_ir_depth_result_processor.cc",
66        "dual_ir_request_processor.cc",
67        "dual_ir_result_request_processor.cc",
68        "hdrplus_capture_session.cc",
69        "pending_requests_tracker.cc",
70        "realtime_zsl_request_processor.cc",
71        "realtime_zsl_result_processor.cc",
72        "realtime_zsl_result_request_processor.cc",
73        "rgbird_capture_session.cc",
74        "rgbird_depth_result_processor.cc",
75        "rgbird_result_request_processor.cc",
76        "rgbird_rt_request_processor.cc",
77        "snapshot_request_processor.cc",
78        "snapshot_result_processor.cc",
79        "vendor_tags.cc",
80        "zsl_snapshot_capture_session.cc",
81    ],
82    shared_libs: [
83        "lib_profiler",
84        "libbase",
85        "libcamera_metadata",
86        "libcutils",
87        "libgooglecamerahalutils",
88        "libhidlbase",
89        "liblog",
90        "libmeminfo",
91        "libui",
92        "libutils",
93        "libsync",
94    ],
95    header_libs: [
96        "lib_depth_generator_headers",
97        "libgooglecamerahal_headers",
98    ],
99    // b/129863492, clang-tidy nondeterministic seg fault
100    tidy: false,
101    export_include_dirs: [
102        ".",
103    ],
104    export_header_lib_headers: [
105        "libgooglecamerahal_headers",
106    ],
107    export_shared_lib_headers: [
108        "lib_profiler",
109    ],
110}
111