1f7a47986Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
2f7a47986Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3f7a47986Sopenharmony_ci# you may not use this file except in compliance with the License.
4f7a47986Sopenharmony_ci# You may obtain a copy of the License at
5f7a47986Sopenharmony_ci#
6f7a47986Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7f7a47986Sopenharmony_ci#
8f7a47986Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9f7a47986Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10f7a47986Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11f7a47986Sopenharmony_ci# See the License for the specific language governing permissions and
12f7a47986Sopenharmony_ci# limitations under the License.
13f7a47986Sopenharmony_ci
14f7a47986Sopenharmony_ciimport("//build/ohos.gni")
15f7a47986Sopenharmony_ciimport("../../../common/config/common.gni")
16f7a47986Sopenharmony_ci
17f7a47986Sopenharmony_ciohos_shared_library("devicecontrol") {
18f7a47986Sopenharmony_ci  include_dirs = [
19f7a47986Sopenharmony_ci    "include",
20f7a47986Sopenharmony_ci    "../common/include",
21f7a47986Sopenharmony_ci  ]
22f7a47986Sopenharmony_ci
23f7a47986Sopenharmony_ci  sources = [
24f7a47986Sopenharmony_ci    "../common/src/napi_edm_common.cpp",
25f7a47986Sopenharmony_ci    "../common/src/napi_edm_error.cpp",
26f7a47986Sopenharmony_ci    "./src/device_control_addon.cpp",
27f7a47986Sopenharmony_ci  ]
28f7a47986Sopenharmony_ci
29f7a47986Sopenharmony_ci  configs = [ "../../../common/config:coverage_flags" ]
30f7a47986Sopenharmony_ci
31f7a47986Sopenharmony_ci  deps = [ "../../inner_api:edmservice_kits" ]
32f7a47986Sopenharmony_ci
33f7a47986Sopenharmony_ci  external_deps = [
34f7a47986Sopenharmony_ci    "ability_base:want",
35f7a47986Sopenharmony_ci    "hilog:libhilog",
36f7a47986Sopenharmony_ci    "napi:ace_napi",
37f7a47986Sopenharmony_ci  ]
38f7a47986Sopenharmony_ci
39f7a47986Sopenharmony_ci  defines = []
40f7a47986Sopenharmony_ci  if (os_account_edm_enable) {
41f7a47986Sopenharmony_ci    external_deps += [ "os_account:os_account_innerkits" ]
42f7a47986Sopenharmony_ci    defines += [ "OS_ACCOUNT_EDM_ENABLE" ]
43f7a47986Sopenharmony_ci  }
44f7a47986Sopenharmony_ci
45f7a47986Sopenharmony_ci  relative_install_dir = "module/enterprise"
46f7a47986Sopenharmony_ci  sanitize = {
47f7a47986Sopenharmony_ci    boundary_sanitize = true
48f7a47986Sopenharmony_ci    cfi = true
49f7a47986Sopenharmony_ci    cfi_cross_dso = true
50f7a47986Sopenharmony_ci    debug = false
51f7a47986Sopenharmony_ci    integer_overflow = true
52f7a47986Sopenharmony_ci    ubsan = true
53f7a47986Sopenharmony_ci  }
54f7a47986Sopenharmony_ci  branch_protector_ret = "pac_ret"
55f7a47986Sopenharmony_ci  subsystem_name = "customization"
56f7a47986Sopenharmony_ci  part_name = "enterprise_device_management"
57f7a47986Sopenharmony_ci}
58