• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("../../../dlp_permission_service.gni")
16
17ROOT_DIR = "${dlp_root_dir}/interfaces/inner_api/dlp_parse"
18
19config("dlpparse_public_config") {
20  visibility = [ ":*" ]
21  include_dirs = [
22    "${dlp_root_dir}/frameworks/common/include",
23    "${dlp_root_dir}/interfaces/inner_api/dlp_permission/include/",
24    "$ROOT_DIR/include",
25  ]
26}
27
28ohos_shared_library("libdlpparse") {
29  sources = [
30    "$ROOT_DIR/src/dlp_file_kits.cpp",
31  ]
32
33  include_dirs = [
34    "$ROOT_DIR/include",
35    "${dlp_root_dir}/frameworks/common/include",
36    "${dlp_root_dir}/interfaces/inner_api/dlp_permission/include/",
37  ]
38
39  deps = [
40    "//third_party/openssl:libcrypto_shared",
41  ]
42
43  external_deps = [
44    "ability_base:want",
45    "c_utils:utils",
46    "hitrace:hitrace_meter",
47    "hilog:libhilog",
48    "ipc:ipc_core",
49  ]
50
51  cflags_cc = [ "-DHILOG_ENABLE" ]
52  public_configs = [ ":dlpparse_public_config" ]
53  configs = [ "${dlp_root_dir}/config:coverage_flags" ]
54
55  part_name = "dlp_permission_service"
56  subsystem_name = "security"
57
58}
59
60ohos_shared_library("libdlpparse_inner") {
61  sources = [
62    "$ROOT_DIR/src/dlp_crypt.cpp",
63    "$ROOT_DIR/src/dlp_file.cpp",
64    "$ROOT_DIR/src/dlp_file_kits.cpp",
65    "$ROOT_DIR/src/dlp_file_manager.cpp",
66  ]
67
68  include_dirs = [
69    "$ROOT_DIR/include",
70    "${dlp_root_dir}/frameworks/common/include",
71    "${dlp_root_dir}/interfaces/inner_api/dlp_permission/include/",
72  ]
73
74  deps = [
75    "${dlp_root_dir}/interfaces/inner_api/dlp_permission:libdlp_permission_sdk",
76    "//third_party/openssl:libcrypto_shared",
77  ]
78
79  external_deps = [
80    "ability_base:want",
81    "c_utils:utils",
82    "hitrace:hitrace_meter",
83    "hilog:libhilog",
84    "ipc:ipc_core",
85    "os_account:libaccountkits",
86  ]
87
88  cflags_cc = [ "-DHILOG_ENABLE" ]
89  public_configs = [ ":dlpparse_public_config" ]
90  configs = [ "${dlp_root_dir}/config:coverage_flags" ]
91
92  part_name = "dlp_permission_service"
93  subsystem_name = "security"
94
95  if (dlp_parse_inner) {
96    cflags_cc += [ "-DDLP_PARSE_INNER" ]
97    external_deps += [
98      "os_account:os_account_innerkits",
99    ]
100  }
101}
102