1# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("./../../multimedia_camera_framework.gni") 16 17ohos_shared_library("camera_service") { 18 install_enable = true 19 sources = [ 20 "binder/client/src/hcamera_device_callback_proxy.cpp", 21 "binder/client/src/hcamera_listener_proxy.cpp", 22 "binder/client/src/hcamera_service_callback_proxy.cpp", 23 "binder/client/src/hcapture_session_callback_proxy.cpp", 24 "binder/client/src/hstream_capture_callback_proxy.cpp", 25 "binder/client/src/hstream_repeat_callback_proxy.cpp", 26 "binder/server/src/hcamera_device_stub.cpp", 27 "binder/server/src/hcamera_service_stub.cpp", 28 "binder/server/src/hcapture_session_stub.cpp", 29 "binder/server/src/hstream_capture_stub.cpp", 30 "binder/server/src/hstream_metadata_stub.cpp", 31 "binder/server/src/hstream_repeat_stub.cpp", 32 "src/camera_util.cpp", 33 "src/hcamera_device.cpp", 34 "src/hcamera_host_manager.cpp", 35 "src/hcamera_service.cpp", 36 "src/hcapture_session.cpp", 37 "src/hstream_capture.cpp", 38 "src/hstream_common.cpp", 39 "src/hstream_metadata.cpp", 40 "src/hstream_repeat.cpp", 41 ] 42 cflags = [ 43 "-fPIC", 44 "-Wall", 45 ] 46 sanitize = { 47 cfi = true 48 cfi_cross_dso = true 49 debug = false 50 blocklist = "../../cfi_blocklist.txt" 51 } 52 53 include_dirs = [ 54 "//drivers/peripheral/display/interfaces/include", 55 "//foundation/graphic/graphic_2d/frameworks/surface/include", 56 "//foundation/multimedia/camera_framework/services/camera_service/include", 57 "//foundation/multimedia/camera_framework/services/camera_service/binder/base/include", 58 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/include", 59 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/include", 60 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include", 61 "//foundation/window/window_manager/interfaces/innerkits/dm", 62 "//base/security/access_token/interfaces/innerkits/accesstoken/include", 63 ] 64 65 if (target_cpu == "arm") { 66 cflags += [ "-DBINDER_IPC_32BIT" ] 67 } 68 69 external_deps = [ 70 "ability_base:want", 71 "access_token:libaccesstoken_sdk", 72 "access_token:libprivacy_sdk", 73 "bundle_framework:appexecfwk_base", 74 "bundle_framework:appexecfwk_core", 75 "c_utils:utils", 76 "drivers_interface_camera:libcamera_proxy_1.0", 77 "drivers_interface_camera:libcamera_proxy_1.1", 78 "drivers_interface_camera:metadata", 79 "graphic_2d:librender_service_client", 80 "graphic_2d:surface", 81 "hdf_core:libhdi", 82 "hicollie:libhicollie", 83 "hilog:libhilog", 84 "hisysevent:libhisysevent", 85 "hitrace:hitrace_meter", 86 "ipc:ipc_core", 87 "ipc:ipc_single", 88 "safwk:system_ability_fwk", 89 "samgr:samgr_proxy", 90 "window_manager:libdm", 91 ] 92 93 include_dirs += [ 94 "//drivers/peripheral/camera/interfaces/include", 95 "//drivers/peripheral/camera/interfaces/hdi_ipc", 96 "//drivers/peripheral/camera/interfaces/hdi_ipc/utils/include", 97 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/device/include", 98 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/operator/include", 99 "//drivers/peripheral/camera/interfaces/hdi_ipc/callback/host/include", 100 ] 101 102 if (use_musl) { 103 if (use_jemalloc && use_jemalloc_dfx_intf) { 104 cflags += [ "-DCONFIG_USE_JEMALLOC_DFX_INTF" ] 105 } 106 } 107 108 cflags_cc = cflags 109 110 part_name = "camera_framework" 111 subsystem_name = "multimedia" 112} 113