1# Copyright (c) 2021-2022 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") 15 16config("camera_framework_public_config") { 17 include_dirs = [ 18 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include", 19 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include/input", 20 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include/output", 21 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include/session", 22 ] 23} 24 25config("camera_framework_local_config") { 26 include_dirs = [ 27 "//foundation/multimedia/camera_framework/services/camera_service/include", 28 "//foundation/multimedia/camera_framework/services/camera_service/binder/base/include", 29 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/include", 30 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/include", 31 "//foundation/multimedia/camera_framework/interfaces/inner_api/native/camera/include", 32 ] 33} 34 35config("camera_framework_drivers_config") { 36 include_dirs = [ 37 "//drivers/peripheral/camera/interfaces/include", 38 "//drivers/peripheral/camera/interfaces/hdi_ipc", 39 "//drivers/peripheral/camera/interfaces/hdi_ipc/server", 40 "//drivers/peripheral/camera/interfaces/metadata/include", 41 ] 42} 43 44ohos_shared_library("camera_framework") { 45 install_enable = true 46 sources = [ 47 "//foundation/multimedia/camera_framework/services/camera_service/binder/base/src/icamera_util.cpp", 48 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hcamera_device_proxy.cpp", 49 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hcamera_service_proxy.cpp", 50 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hcapture_session_proxy.cpp", 51 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hstream_capture_proxy.cpp", 52 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hstream_metadata_proxy.cpp", 53 "//foundation/multimedia/camera_framework/services/camera_service/binder/client/src/hstream_repeat_proxy.cpp", 54 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hcamera_device_callback_stub.cpp", 55 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hcamera_listener_stub.cpp", 56 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hcamera_service_callback_stub.cpp", 57 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hcapture_session_callback_stub.cpp", 58 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hstream_capture_callback_stub.cpp", 59 "//foundation/multimedia/camera_framework/services/camera_service/binder/server/src/hstream_repeat_callback_stub.cpp", 60 "src/input/camera_device.cpp", 61 "src/input/camera_input.cpp", 62 "src/input/camera_manager.cpp", 63 "src/input/capture_input.cpp", 64 "src/output/camera_output_capability.cpp", 65 "src/output/capture_output.cpp", 66 "src/output/metadata_output.cpp", 67 "src/output/photo_output.cpp", 68 "src/output/preview_output.cpp", 69 "src/output/video_output.cpp", 70 "src/session/capture_session.cpp", 71 ] 72 73 cflags = [ 74 "-fPIC", 75 "-Wall", 76 "-DSUPPORT_CAMERA_AUTH", 77 ] 78 if (target_cpu == "arm") { 79 cflags += [ "-DBINDER_IPC_32BIT" ] 80 } 81 82 public_configs = [ 83 ":camera_framework_public_config", 84 ":camera_framework_local_config", 85 ":camera_framework_drivers_config", 86 ] 87 88 include_dirs = [ 89 "//foundation/graphic/graphic_2d/frameworks/surface/include", 90 "//utils/system/safwk/native/include", 91 ] 92 93 deps = [ 94 "//drivers/interface/camera/v1_0:libcamera_proxy_1.0", 95 "//drivers/peripheral/camera/interfaces/metadata:metadata", 96 "//foundation/graphic/graphic_2d:libsurface", 97 ] 98 99 external_deps = [ 100 "hisysevent_native:libhisysevent", 101 "hitrace_native:hitrace_meter", 102 "hiviewdfx_hilog_native:libhilog", 103 "ipc:ipc_core", 104 "safwk:system_ability_fwk", 105 "samgr:samgr_proxy", 106 ] 107 108 cflags_cc = cflags 109 110 part_name = "multimedia_camera_framework" 111 subsystem_name = "multimedia" 112} 113