mirror of
https://github.com/openharmony/device_manager.git
synced 2026-08-27 03:21:19 -04:00
6f6c78827c
Signed-off-by: wangyb0625 <wangyibo38@huawei.com>
202 lines
6.8 KiB
Plaintext
202 lines
6.8 KiB
Plaintext
# Copyright (c) 2022 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.
|
|
|
|
if (defined(ohos_lite)) {
|
|
import("//build/lite/config/component/lite_component.gni")
|
|
} else {
|
|
import("//build/ohos.gni")
|
|
}
|
|
|
|
import("//foundation/distributedhardware/device_manager/device_manager.gni")
|
|
|
|
if (defined(ohos_lite)) {
|
|
if (ohos_kernel_type == "liteos_m") {
|
|
static_library("devicemanagerutils_mini") {
|
|
include_dirs = [
|
|
"${utils_path}/include",
|
|
"${utils_path}/include/dfx",
|
|
"${utils_path}/include/dfx/lite",
|
|
"${utils_path}/include/permission/lite",
|
|
"${common_path}/include",
|
|
"${innerkits_path}/native_cpp/include",
|
|
]
|
|
|
|
include_dirs += [
|
|
"//base/security/device_auth/interfaces/innerkits",
|
|
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
|
|
"//utils/native/lite/include",
|
|
"//utils/system/safwk/native/include",
|
|
"//third_party/json/include",
|
|
"//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
|
|
"//third_party/bounds_checking_function/include",
|
|
"//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
|
|
]
|
|
|
|
sources = [
|
|
"${utils_path}/src/dfx/lite/dm_hidumper.cpp",
|
|
"${utils_path}/src/dfx/lite/dm_hisysevent.cpp",
|
|
"${utils_path}/src/dfx/lite/dm_hitrace.cpp",
|
|
"${utils_path}/src/dm_anonymous.cpp",
|
|
"${utils_path}/src/dm_error_message.cpp",
|
|
"${utils_path}/src/dm_log.cpp",
|
|
"${utils_path}/src/dm_random.cpp",
|
|
"${utils_path}/src/permission/lite/permission_manager.cpp",
|
|
]
|
|
|
|
defines = [
|
|
"__LITEOS_M__",
|
|
"HI_LOG_ENABLE",
|
|
"DH_LOG_TAG=\"devicemanagerutils\"",
|
|
"LOG_DOMAIN=0xD004100",
|
|
]
|
|
|
|
deps = [
|
|
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static",
|
|
"//base/startup/syspara_lite/frameworks/parameter/src:sysparam",
|
|
"//foundation/distributedschedule/samgr_lite/samgr",
|
|
"//third_party/bounds_checking_function:libsec_static",
|
|
"//third_party/mbedtls",
|
|
"//third_party/mbedtls:mbedtls_shared",
|
|
"//utils/native/lite:utils",
|
|
]
|
|
}
|
|
} else {
|
|
shared_library("devicemanagerutils") {
|
|
include_dirs = [
|
|
"${common_path}/include",
|
|
"${common_path}/include/ipc",
|
|
"${common_path}/include/ipc/model",
|
|
"${innerkits_path}/native_cpp/include",
|
|
"include",
|
|
"include/dfx",
|
|
"include/dfx/lite",
|
|
"include/fwkload/lite",
|
|
"include/ipc/lite",
|
|
"include/permission/lite",
|
|
]
|
|
include_dirs += [
|
|
"//base/security/device_auth/interfaces/innerkits",
|
|
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
|
|
"//utils/native/lite/include",
|
|
"//utils/system/safwk/native/include",
|
|
"//third_party/json/include",
|
|
"//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
|
|
"//third_party/bounds_checking_function/include",
|
|
"//foundation/communication/ipc/interfaces/innerkits/c/ipc/include",
|
|
"//foundation/communication/dsoftbus/interfaces/kits/bus_center",
|
|
"//foundation/communication/dsoftbus/interfaces/kits/common",
|
|
"//foundation/communication/dsoftbus/interfaces/kits/discovery",
|
|
"//foundation/communication/dsoftbus/interfaces/kits/transport",
|
|
"//foundation/communication/dsoftbus/interfaces/inner_kits/transport",
|
|
"//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
|
|
]
|
|
sources = [
|
|
"src/dfx/lite/dm_hidumper.cpp",
|
|
"src/dfx/lite/dm_hisysevent.cpp",
|
|
"src/dfx/lite/dm_hitrace.cpp",
|
|
"src/dm_anonymous.cpp",
|
|
"src/dm_error_message.cpp",
|
|
"src/dm_log.cpp",
|
|
"src/dm_random.cpp",
|
|
"src/fwkload/lite/dm_distributed_hardware_load.cpp",
|
|
"src/ipc/lite/ipc_cmd_register.cpp",
|
|
"src/permission/lite/permission_manager.cpp",
|
|
]
|
|
defines = [
|
|
"LITE_DEVICE",
|
|
"hI_LOG_ENABLE",
|
|
"DH_LOG_TAG=\"devicemanagerutils\"",
|
|
"lOG_DOMAIN=0xD004100",
|
|
]
|
|
deps = [
|
|
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
|
|
"//base/startup/syspara_lite/frameworks/parameter/src:sysparam",
|
|
"//foundation/communication/dsoftbus/sdk:softbus_client",
|
|
"//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
|
|
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
|
|
"//third_party/bounds_checking_function:libsec_shared",
|
|
"//third_party/mbedtls:mbedtls_shared",
|
|
"//utils/native/lite:utils",
|
|
]
|
|
}
|
|
}
|
|
} else {
|
|
config("devicemanagerutils_config") {
|
|
include_dirs = [
|
|
"include",
|
|
"include/fwkload/standard",
|
|
"include/dfx",
|
|
"include/dfx/standard",
|
|
"include/ipc/standard",
|
|
"${common_path}/include",
|
|
"${common_path}/include/ipc",
|
|
"${common_path}/include/ipc/model",
|
|
"${innerkits_path}/native_cpp/include",
|
|
"include/permission/standard",
|
|
"//third_party/mbedtls/include/mbedtls",
|
|
]
|
|
}
|
|
|
|
ohos_shared_library("devicemanagerutils") {
|
|
sources = [
|
|
"src/dfx/standard/dm_hidumper.cpp",
|
|
"src/dfx/standard/dm_hisysevent.cpp",
|
|
"src/dfx/standard/dm_hitrace.cpp",
|
|
"src/dm_anonymous.cpp",
|
|
"src/dm_error_message.cpp",
|
|
"src/dm_hash.cpp",
|
|
"src/dm_log.cpp",
|
|
"src/dm_random.cpp",
|
|
"src/ipc/standard/ipc_cmd_register.cpp",
|
|
]
|
|
if (support_jsapi) {
|
|
sources += [
|
|
"src/fwkload/standard/dm_distributed_hardware_load.cpp",
|
|
"src/permission/standard/permission_manager.cpp",
|
|
]
|
|
}
|
|
|
|
public_configs = [ ":devicemanagerutils_config" ]
|
|
|
|
defines = [
|
|
"HI_LOG_ENABLE",
|
|
"DH_LOG_TAG=\"devicemanagerutils\"",
|
|
"LOG_DOMAIN=0xD004100",
|
|
]
|
|
|
|
deps = [ "//third_party/mbedtls:mbedtls_shared" ]
|
|
|
|
external_deps = [
|
|
"access_token:libaccesstoken_sdk",
|
|
"hisysevent_native:libhisysevent",
|
|
"hitrace_native:hitrace_meter",
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
"ipc:ipc_core",
|
|
"safwk:system_ability_fwk",
|
|
"samgr_standard:samgr_proxy",
|
|
"utils_base:utils",
|
|
]
|
|
if (support_jsapi) {
|
|
external_deps += [
|
|
"ability_base:want",
|
|
"bundle_framework:appexecfwk_base",
|
|
"bundle_framework:appexecfwk_core",
|
|
]
|
|
}
|
|
|
|
subsystem_name = "distributedhardware"
|
|
|
|
part_name = "device_manager"
|
|
}
|
|
}
|