• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//base/inputmethod/imf/inputmethod.gni")
15import("//build/ohos.gni")
16
17config("inputmethod_client_native_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "include",
21    "${inputmethod_path}/common/include",
22    "${inputmethod_path}/frameworks/common",
23    "${inputmethod_path}/frameworks/native/inputmethod_controller/include",
24    "${inputmethod_path}/interfaces/inner_api/inputmethod_controller/include",
25    "${inputmethod_path}/services/include",
26  ]
27}
28
29config("inputmethod_client_native_public_config") {
30  visibility = [ "./*" ]
31  include_dirs = [
32    "include",
33    "${inputmethod_path}/common/include",
34    "${inputmethod_path}/frameworks/common",
35    "${inputmethod_path}/frameworks/native/inputmethod_controller/include",
36    "${inputmethod_path}/frameworks/native/inputmethod_ability/include",
37    "${inputmethod_path}/interfaces/inner_api/inputmethod_ability/include",
38    "${inputmethod_path}/interfaces/inner_api/inputmethod_controller/include",
39    "${inputmethod_path}/services/include",
40  ]
41}
42
43ohos_shared_library("inputmethod_client") {
44  branch_protector_ret = "pac_ret"
45
46  sanitize = {
47    boundary_sanitize = true
48    cfi = true
49    cfi_cross_dso = true
50    debug = false
51    integer_overflow = true
52    ubsan = true
53  }
54  sources = [
55    "${inputmethod_path}/frameworks/native/inputmethod_ability/src/input_method_agent_proxy.cpp",
56    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/ime_event_monitor_manager.cpp",
57    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/ime_event_monitor_manager_impl.cpp",
58    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/ime_system_channel.cpp",
59    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_client_stub.cpp",
60    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_data_channel_stub.cpp",
61    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_controller.cpp",
62    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_system_ability_proxy.cpp",
63    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_utils.cpp",
64    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/keyevent_consumer_stub.cpp",
65    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/system_cmd_channel_stub.cpp",
66  ]
67
68  cflags_cc = [
69    "-fvisibility=hidden",
70    "-fvisibility-inlines-hidden",
71    "-fdata-sections",
72    "-ffunction-sections",
73    "-Os",
74    "-Wno-c99-designator",
75  ]
76
77  version_script = "inputmethod_client.versionscript"
78
79  innerapi_tags = [ "platformsdk" ]
80
81  deps = [
82    "${inputmethod_path}/common:inputmethod_common",
83    "${inputmethod_path}/common/imf_hisysevent:imf_hisysevent",
84  ]
85
86  external_deps = [
87    "bundle_framework:appexecfwk_base",
88    "bundle_framework:appexecfwk_core",
89    "cJSON:cjson",
90    "c_utils:utils",
91    "eventhandler:libeventhandler",
92    "hilog:libhilog",
93    "input:libmmi-client",
94    "ipc:ipc_single",
95    "samgr:samgr_proxy",
96  ]
97  public_external_deps = [ "ability_base:want" ]
98
99  if (imf_on_demand_start_stop_sa_enable) {
100    if (defined(defines)) {
101      defines += [ "IMF_ON_DEMAND_START_STOP_SA_ENABLE" ]
102    } else {
103      defines = [ "IMF_ON_DEMAND_START_STOP_SA_ENABLE" ]
104    }
105  }
106
107  configs = [ ":inputmethod_client_native_config" ]
108
109  public_configs = [ ":inputmethod_client_native_public_config" ]
110
111  subsystem_name = "inputmethod"
112  part_name = "imf"
113}
114
115ohos_static_library("inputmethod_client_static") {
116  testonly = true
117  branch_protector_ret = "pac_ret"
118  sanitize = {
119    boundary_sanitize = true
120    cfi = true
121    cfi_cross_dso = true
122    debug = false
123    integer_overflow = true
124    ubsan = true
125  }
126  sources = [
127    "${inputmethod_path}/frameworks/native/inputmethod_ability/src/input_method_agent_proxy.cpp",
128    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/ime_event_monitor_manager.cpp",
129    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/ime_event_monitor_manager_impl.cpp",
130    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/ime_system_channel.cpp",
131    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_client_stub.cpp",
132    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_data_channel_stub.cpp",
133    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_controller.cpp",
134    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_system_ability_proxy.cpp",
135    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_utils.cpp",
136    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/keyevent_consumer_stub.cpp",
137    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/system_cmd_channel_stub.cpp",
138  ]
139
140  public_configs = [ ":inputmethod_client_native_public_config" ]
141
142  deps = [
143    "${inputmethod_path}/common:inputmethod_common",
144    "${inputmethod_path}/common/imf_hisysevent:imf_hisysevent",
145  ]
146
147  external_deps = [
148    "bundle_framework:appexecfwk_base",
149    "bundle_framework:appexecfwk_core",
150    "cJSON:cjson",
151    "c_utils:utils",
152    "eventhandler:libeventhandler",
153    "hilog:libhilog",
154    "input:libmmi-client",
155    "ipc:ipc_single",
156    "samgr:samgr_proxy",
157  ]
158
159  public_external_deps = [ "ability_base:want" ]
160
161  subsystem_name = "inputmethod"
162  part_name = "imf"
163}
164