• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("//base/inputmethod/imf/inputmethod.gni")
15import("//build/ohos.gni")
16
17config("inputmethod_common_native_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "include",
21    "${inputmethod_path}/frameworks/native/inputmethod_controller/include",
22    "${inputmethod_path}/frameworks/native/inputmethod_ability/include",
23  ]
24}
25
26ohos_shared_library("inputmethod_common") {
27  branch_protector_ret = "pac_ret"
28  sanitize = {
29    boundary_sanitize = true
30    cfi = true
31    cfi_cross_dso = true
32    debug = false
33    integer_overflow = true
34    ubsan = true
35  }
36  cflags_cc = [
37    "-fdata-sections",
38    "-ffunction-sections",
39    "-Os",
40  ]
41  sources = [
42    "src/global.cpp",
43    "src/input_death_recipient.cpp",
44    "src/inputmethod_dump.cpp",
45    "src/inputmethod_sysevent.cpp",
46    "src/inputmethod_trace.cpp",
47    "src/itypes_util.cpp",
48    "src/message.cpp",
49    "src/message_handler.cpp",
50    "src/on_demand_start_stop_sa.cpp",
51  ]
52
53  if (imf_on_demand_start_stop_sa_enable) {
54    if (defined(defines)) {
55      defines += [ "IMF_ON_DEMAND_START_STOP_SA_ENABLE" ]
56    } else {
57      defines = [ "IMF_ON_DEMAND_START_STOP_SA_ENABLE" ]
58    }
59  }
60
61  configs = [ ":inputmethod_common_native_config" ]
62
63  public_configs = [ ":inputmethod_common_native_config" ]
64
65  external_deps = [
66    "ability_base:want",
67    "c_utils:utils",
68    "hilog:libhilog",
69    "hisysevent:libhisysevent",
70    "hitrace:hitrace_meter",
71    "hitrace:libhitracechain",
72    "input:libmmi-client",
73    "ipc:ipc_single",
74    "samgr:samgr_proxy",
75  ]
76
77  subsystem_name = "inputmethod"
78  part_name = "imf"
79}
80