• 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  sources = [
49    "${inputmethod_path}/frameworks/js/napi/inputmethodclient/async_call.cpp",
50    "${inputmethod_path}/frameworks/js/napi/inputmethodclient/js_utils.cpp",
51    "${inputmethod_path}/services/src/global.cpp",
52    "input_method_engine_module.cpp",
53    "js_input_method_engine_setting.cpp",
54    "js_keyboard_controller_engine.cpp",
55    "js_keyboard_delegate_setting.cpp",
56    "js_panel.cpp",
57    "js_text_input_client_engine.cpp",
58    "panel_listener_impl.cpp",
59  ]
60
61  configs = [ ":inputmethodengine_native_config" ]
62
63  deps = [
64    "${inputmethod_path}/frameworks/js/napi/common:inputmethod_js_common",
65    "${inputmethod_path}/frameworks/native/inputmethod_ability:inputmethod_ability",
66    "${inputmethod_path}/services/dfx:inputmethod_dfx_static",
67  ]
68
69  external_deps = [
70    "ability_base:configuration",
71    "ability_runtime:ability_context_native",
72    "ability_runtime:abilitykit_native",
73    "ability_runtime:napi_base_context",
74    "c_utils:utils",
75    "hilog:libhilog",
76    "input:libmmi-client",
77    "input:libmmi-util",
78    "ipc:ipc_core",
79    "napi:ace_napi",
80  ]
81
82  public_configs = [ ":inputmethodengine_native_public_config" ]
83
84  relative_install_dir = "module"
85  subsystem_name = "inputmethod"
86  part_name = "imf"
87}
88