# 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. import("//build/ohos.gni") SUBSYSTEM_DIR = "//base/customization/enterprise_device_management" EDM_SA_ROOT = "$SUBSYSTEM_DIR/services/edm" EDM_SRC_PATH = "$EDM_SA_ROOT/src" JSONCPP_INCLUDE_DIR = "//third_party/jsoncpp/include" config("edm_config") { cflags = [ "-Wno-error=implicit-fallthrough" ] include_dirs = [ "//utils/native/base/include", "include", "include/utils", "//utils/native/base:utils_config", JSONCPP_INCLUDE_DIR, "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core/include/bundlemgr", "$SUBSYSTEM_DIR/common/native/include", ] } ohos_shared_library("edmservice") { sources = [ "$EDM_SRC_PATH/admin.cpp", "$EDM_SRC_PATH/admin_manager.cpp", "$EDM_SRC_PATH/edm_permission.cpp", "$EDM_SRC_PATH/enterprise_device_mgr_ability.cpp", "$EDM_SRC_PATH/enterprise_device_mgr_stub.cpp", "$EDM_SRC_PATH/iplugin.cpp", "$EDM_SRC_PATH/permission_manager.cpp", "$EDM_SRC_PATH/plugin_manager.cpp", "$EDM_SRC_PATH/policy_manager.cpp", "$EDM_SRC_PATH/super_admin.cpp", "$EDM_SRC_PATH/utils/array_map_serializer.cpp", "$EDM_SRC_PATH/utils/array_string_serializer.cpp", "$EDM_SRC_PATH/utils/bool_serializer.cpp", "$EDM_SRC_PATH/utils/func_code_utils.cpp", "$EDM_SRC_PATH/utils/json_serializer.cpp", "$EDM_SRC_PATH/utils/long_serializer.cpp", "$EDM_SRC_PATH/utils/map_string_serializer.cpp", "$EDM_SRC_PATH/utils/string_serializer.cpp", ] public_configs = [ ":edm_config" ] defines = [] if (target_cpu == "arm64") { defines += [ "_ARM64_" ] print("defines _ARM64_") } external_deps = [ "ability_base:want", "ability_runtime:app_manager", "ability_runtime:intent", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "enterprise_device_management:edmservice_kits", "ipc:ipc_core", "os_account_standard:libaccountkits", "permission_standard:libpermissionsdk_standard", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "startup_l2:syspara", ] if (is_standard_system) { external_deps += [ "hiviewdfx_hilog_native:libhilog" ] } else { external_deps += [ "hilog:libhilog" ] } deps = [ "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", ] subsystem_name = "customization" part_name = "enterprise_device_management" }