1# Copyright (c) 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("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17config("ability_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "${ability_runtime_path}/interfaces/kits/native/ability/native", 21 "${ability_runtime_services_path}/common/include", 22 ] 23 cflags = [] 24 if (target_cpu == "arm") { 25 cflags += [ "-DBINDER_IPC_32BIT" ] 26 } 27} 28 29ohos_shared_library("driver_extension") { 30 include_dirs = [ "include" ] 31 32 sources = [ 33 "src/driver_extension.cpp", 34 "src/driver_extension_context.cpp", 35 "src/js_driver_extension.cpp", 36 "src/js_driver_extension_context.cpp", 37 ] 38 39 external_deps = [ 40 "ability_base:want", 41 "ability_runtime:ability_context_native", 42 "ability_runtime:ability_manager", 43 "ability_runtime:abilitykit_native", 44 "ability_runtime:app_context", 45 "ability_runtime:napi_common", 46 "ability_runtime:runtime", 47 "c_utils:utils", 48 "eventhandler:libeventhandler", 49 "hilog:libhilog", 50 "hitrace:hitrace_meter", 51 "ipc:ipc_core", 52 "ipc:ipc_napi", 53 "napi:ace_napi", 54 ] 55 56 subsystem_name = "hdf" 57 part_name = "external_device_manager" 58} 59 60ohos_shared_library("driver_extension_module") { 61 include_dirs = [ "include" ] 62 63 sources = [ "src/driver_extension_module_loader.cpp" ] 64 65 configs = [ ":ability_config" ] 66 67 deps = [ ":driver_extension" ] 68 69 external_deps = [ 70 "ability_base:configuration", 71 "ability_base:session_info", 72 "ace_engine:ace_uicontent", 73 "bundle_framework:appexecfwk_base", 74 "bundle_framework:appexecfwk_core", 75 "c_utils:utils", 76 "hilog:libhilog", 77 "ipc:ipc_core", 78 "napi:ace_napi", 79 ] 80 81 relative_install_dir = "extensionability/" 82 subsystem_name = "hdf" 83 part_name = "external_device_manager" 84} 85