1# Copyright (c) 2022 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("//test/xts/device_attest/build/devattestconfig.gni")
16
17config("devattest_sdk_private_config") {
18  include_dirs = [
19    "${devattest_path}/common",
20    "${devattest_path}/common/log",
21  ]
22}
23
24config("devattest_sdk_public_config") {
25  include_dirs = [ "${devattest_innerkit_path}/native_cpp/include" ]
26}
27
28ohos_shared_library("devattest_sdk") {
29  version_script = "libdevattest_sdk.map"
30
31  sanitize = {
32    cfi = true
33    cfi_cross_dso = true
34    debug = false
35  }
36
37  branch_protector_ret = "pac_ret"
38
39  sources = [
40    "${devattest_path}/services/devattest_ability/src/attest_result_info.cpp",
41    "src/devattest_client.cpp",
42    "src/devattest_profile_load_callback.cpp",
43    "src/devattest_service_proxy.cpp",
44  ]
45
46  configs = [ ":devattest_sdk_private_config" ]
47
48  public_configs = [ ":devattest_sdk_public_config" ]
49
50  external_deps = [
51    "c_utils:utils",
52    "hilog:libhilog",
53    "ipc:ipc_core",
54    "samgr:samgr_proxy",
55  ]
56
57  subsystem_name = "xts"
58  innerapi_tags = [ "platformsdk" ]
59  part_name = "device_attest"
60}
61