1ea497e4dSopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd.
2ea497e4dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3ea497e4dSopenharmony_ci# you may not use this file except in compliance with the License.
4ea497e4dSopenharmony_ci# You may obtain a copy of the License at
5ea497e4dSopenharmony_ci#
6ea497e4dSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7ea497e4dSopenharmony_ci#
8ea497e4dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9ea497e4dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10ea497e4dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11ea497e4dSopenharmony_ci# See the License for the specific language governing permissions and
12ea497e4dSopenharmony_ci# limitations under the License.
13ea497e4dSopenharmony_ci
14ea497e4dSopenharmony_ciimport("//build/ohos.gni")
15ea497e4dSopenharmony_ci
16ea497e4dSopenharmony_ciohos_shared_library("faceauth") {
17ea497e4dSopenharmony_ci  sanitize = {
18ea497e4dSopenharmony_ci    integer_overflow = true
19ea497e4dSopenharmony_ci    ubsan = true
20ea497e4dSopenharmony_ci    boundary_sanitize = true
21ea497e4dSopenharmony_ci    cfi = true
22ea497e4dSopenharmony_ci    cfi_cross_dso = true
23ea497e4dSopenharmony_ci    debug = false
24ea497e4dSopenharmony_ci    blocklist = "../../../cfi_blocklist.txt"
25ea497e4dSopenharmony_ci  }
26ea497e4dSopenharmony_ci  branch_protector_ret = "pac_ret"
27ea497e4dSopenharmony_ci  include_dirs = [
28ea497e4dSopenharmony_ci    "../../../common/logs",
29ea497e4dSopenharmony_ci    "../../../common/inc",
30ea497e4dSopenharmony_ci    "../../../common/utils",
31ea497e4dSopenharmony_ci  ]
32ea497e4dSopenharmony_ci
33ea497e4dSopenharmony_ci  sources = [ "src/face_auth_napi.cpp" ]
34ea497e4dSopenharmony_ci
35ea497e4dSopenharmony_ci  deps = [ "../../../frameworks/ipc:faceauth_framework" ]
36ea497e4dSopenharmony_ci  remove_configs = [ "//build/config/compiler:no_exceptions" ]
37ea497e4dSopenharmony_ci  external_deps = [
38ea497e4dSopenharmony_ci    "c_utils:utils",
39ea497e4dSopenharmony_ci    "hilog:libhilog",
40ea497e4dSopenharmony_ci    "ipc:ipc_single",
41ea497e4dSopenharmony_ci    "napi:ace_napi",
42ea497e4dSopenharmony_ci  ]
43ea497e4dSopenharmony_ci  if (defined(global_parts_info.graphic_graphic_2d)) {
44ea497e4dSopenharmony_ci    external_deps += [ "graphic_surface:surface" ]
45ea497e4dSopenharmony_ci  }
46ea497e4dSopenharmony_ci
47ea497e4dSopenharmony_ci  relative_install_dir = "module/useriam"
48ea497e4dSopenharmony_ci
49ea497e4dSopenharmony_ci  subsystem_name = "useriam"
50ea497e4dSopenharmony_ci  part_name = "face_auth"
51ea497e4dSopenharmony_ci}
52