1# Copyright (c) 2022-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")
15
16config("faceauthservice_ex_config") {
17  include_dirs = [ "inc" ]
18}
19
20ohos_source_set("faceauthservice_ex_source_set") {
21  sanitize = {
22    integer_overflow = true
23    ubsan = true
24    boundary_sanitize = true
25    cfi = true
26    cfi_cross_dso = true
27    debug = false
28    blocklist = "../cfi_blocklist.txt"
29  }
30  branch_protector_ret = "pac_ret"
31  sources = [
32    "src/finite_state_machine_builder.cpp",
33    "src/finite_state_machine_impl.cpp",
34    "src/screen_brightness_task.cpp",
35    "src/thread_handler_impl.cpp",
36  ]
37  include_dirs = [
38    "inc",
39    "../services/inc",
40    "../common/inc",
41    "../common/logs",
42    "../common/utils",
43  ]
44
45  public_configs = [ ":faceauthservice_ex_config" ]
46
47  deps = [ "../services:faceauthservice" ]
48
49  external_deps = [
50    "c_utils:utils",
51    "display_manager:displaymgr",
52    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
53    "drivers_interface_face_auth:libface_auth_proxy_2.0",
54    "hilog:libhilog",
55    "init:libbegetutil",
56    "power_manager:powermgr_client",
57    "sensor:sensor_interface_native",
58    "user_auth_framework:userauth_executors",
59  ]
60
61  if (defined(global_parts_info.graphic_graphic_2d)) {
62    external_deps += [ "graphic_surface:surface" ]
63  }
64
65  remove_configs = [ "//build/config/compiler:no_exceptions" ]
66
67  subsystem_name = "useriam"
68  part_name = "face_auth"
69}
70
71ohos_shared_library("faceauthservice_ex") {
72  sanitize = {
73    integer_overflow = true
74    ubsan = true
75    boundary_sanitize = true
76    cfi = true
77    cfi_cross_dso = true
78    debug = false
79    blocklist = "../cfi_blocklist.txt"
80  }
81  branch_protector_ret = "pac_ret"
82  deps = [ ":faceauthservice_ex_source_set" ]
83
84  external_deps = [ "hilog:libhilog" ]
85
86  if (use_musl) {
87    version_script = "face_auth_service_ex_map"
88  }
89
90  subsystem_name = "useriam"
91  part_name = "face_auth"
92}
93