1# Copyright (c) 2022 - 2024 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("//build/ohos_var.gni") 16import( 17 "//foundation/distributedhardware/distributed_camera/distributedcamera.gni") 18 19config("module_private_config") { 20 include_dirs = [ 21 "${common_path}/include/constants", 22 "${common_path}/include/utils", 23 "${services_path}/cameraservice/base/include", 24 "${services_path}/cameraservice/cameraoperator/client/include", 25 "${services_path}/cameraservice/cameraoperator/client/include/callback", 26 "${services_path}/cameraservice/cameraoperator/client/include/listener", 27 ] 28} 29 30ohos_executable("dcamera_client_demo") { 31 branch_protector_ret = "pac_ret" 32 sanitize = { 33 cfi = true 34 cfi_cross_dso = true 35 debug = false 36 } 37 38 install_enable = false 39 40 sources = [ "main.cpp" ] 41 42 configs = [ ":module_private_config" ] 43 44 cflags = [ 45 "-fPIC", 46 "-Wall", 47 ] 48 49 if (!distributed_camera_common) { 50 cflags += [ "-DDCAMERA_YUV" ] 51 } 52 53 deps = [ 54 "${common_path}:distributed_camera_utils", 55 "${services_path}/cameraservice/cameraoperator/client:distributed_camera_client", 56 "${services_path}/cameraservice/sinkservice:distributed_camera_sink", 57 ] 58 59 external_deps = [ 60 "access_token:libaccesstoken_sdk", 61 "access_token:libnativetoken_shared", 62 "access_token:libtokensetproc_shared", 63 "av_codec:av_codec_client", 64 "cJSON:cjson", 65 "c_utils:utils", 66 "camera_framework:camera_framework", 67 "distributed_hardware_fwk:distributedhardwareutils", 68 "drivers_interface_camera:metadata", 69 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", 70 "drivers_peripheral_display:hdi_gralloc_client", 71 "graphic_surface:surface", 72 "hilog:libhilog", 73 "ipc:ipc_core", 74 "samgr:samgr_proxy", 75 ] 76 77 defines = [ 78 "HI_LOG_ENABLE", 79 "DH_LOG_TAG=\"DCameraClientDemo\"", 80 "LOG_DOMAIN=0xD004150", 81 ] 82 83 cflags_cc = cflags 84 85 subsystem_name = "distributedhardware" 86 87 part_name = "distributed_camera" 88} 89