# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") config("ability_config") { visibility = [ ":*" ] include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/ability/native", "${ability_runtime_services_path}/common/include", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } } ohos_shared_library("driver_extension") { include_dirs = [ "include" ] sources = [ "src/driver_extension.cpp", "src/driver_extension_context.cpp", "src/js_driver_extension.cpp", "src/js_driver_extension_context.cpp", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:app_context", "ability_runtime:napi_common", "ability_runtime:runtime", "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", "ipc:ipc_napi_common", "napi:ace_napi", ] subsystem_name = "hdf" part_name = "external_device_manager" } ohos_shared_library("driver_extension_module") { include_dirs = [ "include" ] sources = [ "src/driver_extension_module_loader.cpp" ] configs = [ ":ability_config" ] deps = [ ":driver_extension" ] external_deps = [ "ability_base:configuration", "ability_base:session_info", "ace_engine:ace_uicontent", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", ] relative_install_dir = "extensionability/" subsystem_name = "hdf" part_name = "external_device_manager" }