• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2023-2023 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16import("//base/security/huks/build/config.gni")
17import("//build/ohos.gni")
18
19ROOT_PATH = "../../../../../.."
20
21HUKS_PATH = "../../.."
22
23ohos_static_library("ace_kit_huks") {
24  subsystem_name = "security"
25  part_name = "huks"
26
27  cflags = []
28  defines = []
29  if (huks_config_file != "") {
30    print(huks_config_file)
31    cflags += [ "-DHKS_CONFIG_FILE=\"${huks_config_file}\"" ]
32  }
33
34  sources = [
35    "$HUKS_PATH/frameworks/huks_standard/main/common/src/hks_errcode_adapter.c",
36    "src/hks_lite_api.cpp",
37    "src/hks_lite_api_abort_session.cpp",
38    "src/hks_lite_api_common.cpp",
39    "src/hks_lite_api_delete_key_item.cpp",
40    "src/hks_lite_api_generate_key_item.cpp",
41    "src/hks_lite_api_init_session.cpp",
42    "src/hks_lite_api_is_key_item_exist.cpp",
43    "src/hks_lite_api_update_finish_session.cpp",
44  ]
45  deps = []
46  include_dirs = []
47
48  configs = [ "$ROOT_PATH/foundation/arkui/ace_engine_lite/frameworks/targets:ace_lite_target_config" ]
49
50  if (huks_enable_log == true) {
51    defines += [ "_HUKS_LOG_ENABLE_" ]
52    deps +=
53        [ "$ROOT_PATH/base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite" ]
54  }
55
56  include_dirs += [
57    "include",
58    "//third_party/bounds_checking_function/include",
59    "$ROOT_PATH/foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/jsi",
60    "$ROOT_PATH/foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/base",
61    "$ROOT_PATH/foundation/arkui/ace_engine_lite/frameworks/src/core/context",
62    "$ROOT_PATH/foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/async",
63    "$HUKS_PATH/frameworks/huks_standard/main/common/include",
64  ]
65  deps += [
66    "$HUKS_PATH/interfaces/inner_api/huks_lite:huks_3.0_sdk",
67    "$ROOT_PATH/foundation/arkui/ace_engine_lite/frameworks:ace_lite",
68    "//third_party/bounds_checking_function:libsec_shared",
69  ]
70}
71