• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//base/inputmethod/imf/inputmethod.gni")
15import("//build/ohos.gni")
16
17config("inputmethodengine_native_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "include",
21    "${inputmethod_path}/common",
22    "${inputmethod_path}/frameworks/common",
23    "${inputmethod_path}/frameworks/native/inputmethod_ability/include",
24    "${inputmethod_path}/frameworks/native/inputmethod_controller/include",
25    "${inputmethod_path}/interfaces/inner_api/inputmethod_controller/include",
26    "${inputmethod_path}/services/dfx/include",
27  ]
28  ldflags = [ "-Wl,--exclude-libs=ALL" ]
29  cflags = [
30    "-fdata-sections",
31    "-ffunction-sections",
32    "-fvisibility=hidden",
33  ]
34}
35
36config("inputmethodengine_native_public_config") {
37  visibility = [ "./*" ]
38  include_dirs = [
39    "include",
40    "${inputmethod_path}/common",
41    "${inputmethod_path}/frameworks/common",
42    "${inputmethod_path}/frameworks/js/napi/inputmethodclient",
43    "${inputmethod_path}/frameworks/js/napi/inputmethodability",
44  ]
45}
46
47ohos_shared_library("inputmethodengine") {
48  branch_protector_ret = "pac_ret"
49  sanitize = {
50    cfi = true
51    cfi_cross_dso = true
52    debug = false
53  }
54  sources = [
55    "${inputmethod_path}/frameworks/js/napi/inputmethodclient/async_call.cpp",
56    "${inputmethod_path}/frameworks/js/napi/inputmethodclient/js_utils.cpp",
57    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/keyevent_consumer_proxy.cpp",
58    "${inputmethod_path}/services/src/global.cpp",
59    "input_method_engine_module.cpp",
60    "js_input_method_engine_setting.cpp",
61    "js_keyboard_controller_engine.cpp",
62    "js_keyboard_delegate_setting.cpp",
63    "js_panel.cpp",
64    "js_text_input_client_engine.cpp",
65    "panel_listener_impl.cpp",
66  ]
67
68  configs = [ ":inputmethodengine_native_config" ]
69
70  deps = [
71    "${inputmethod_path}/frameworks/js/napi/common:inputmethod_js_common",
72    "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:inputmethod_ability",
73    "${inputmethod_path}/services/dfx:inputmethod_dfx_static",
74  ]
75
76  external_deps = [
77    "ability_base:configuration",
78    "ability_runtime:ability_context_native",
79    "ability_runtime:abilitykit_native",
80    "ability_runtime:napi_base_context",
81    "c_utils:utils",
82    "eventhandler:libeventhandler",
83    "hilog:libhilog",
84    "input:libmmi-client",
85    "input:libmmi-util",
86    "ipc:ipc_core",
87    "napi:ace_napi",
88  ]
89
90  public_configs = [ ":inputmethodengine_native_public_config" ]
91
92  relative_install_dir = "module"
93  subsystem_name = "inputmethod"
94  part_name = "imf"
95}
96