• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//base/inputmethod/imf/inputmethod.gni")
15import("//build/ohos.gni")
16
17config("ability_config") {
18  visibility = [ ":*" ]
19
20  cflags = []
21  if (target_cpu == "arm") {
22    cflags += [ "-DBINDER_IPC_32BIT" ]
23  }
24  defines = [
25    "APP_LOG_TAG = \"Ability\"",
26    "LOG_DOMAIN = 0xD002200",
27  ]
28}
29
30config("ability_public_config") {
31  visibility = [ ":*" ]
32  include_dirs = [ "${inputmethod_path}/frameworks/kits/extension/include" ]
33}
34
35ohos_shared_library("inputmethod_extension") {
36  branch_protector_ret = "pac_ret"
37  sanitize = {
38    cfi = true
39    cfi_cross_dso = true
40    debug = false
41  }
42  cflags_cc = [
43    "-fdata-sections",
44    "-ffunction-sections",
45    "-Os",
46  ]
47  include_dirs = [
48    "${inputmethod_path}/frameworks/js/napi/common",
49    "${inputmethod_path}/frameworks/js/napi/inputmethodclient",
50    "${inputmethod_path}/frameworks/kits/extension/include",
51    "${inputmethod_path}/frameworks/native/inputmethod_controller/include",
52    "${inputmethod_path}/interfaces/inner_api/inputmethod_controller/include",
53    "${inputmethod_path}/common/include",
54  ]
55
56  sources = [
57    "${inputmethod_path}/frameworks/js/napi/inputmethodclient/js_utils.cpp",
58    "${inputmethod_path}/frameworks/kits/extension/src/inputmethod_extension.cpp",
59    "${inputmethod_path}/frameworks/kits/extension/src/inputmethod_extension_context.cpp",
60    "${inputmethod_path}/frameworks/kits/extension/src/js_inputmethod_extension.cpp",
61    "${inputmethod_path}/frameworks/kits/extension/src/js_inputmethod_extension_context.cpp",
62  ]
63  configs = [ ":ability_config" ]
64  public_configs = [ ":ability_public_config" ]
65
66  deps = [
67    "${inputmethod_path}/common:inputmethod_common",
68    "${inputmethod_path}/frameworks/js/napi/common:inputmethod_js_common",
69    "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:inputmethod_ability",
70  ]
71
72  external_deps = [
73    "ability_base:configuration",
74    "ability_base:want",
75    "ability_runtime:ability_context_native",
76    "ability_runtime:ability_manager",
77    "ability_runtime:abilitykit_native",
78    "ability_runtime:app_context",
79    "ability_runtime:napi_common",
80    "ability_runtime:runtime",
81    "c_utils:utils",
82    "eventhandler:libeventhandler",
83    "hilog:libhilog",
84    "i18n:intl_util",
85    "input:libmmi-client",
86    "ipc:ipc_napi",
87    "ipc:ipc_single",
88    "napi:ace_napi",
89    "samgr:samgr_proxy",
90    "window_manager:libdm",
91  ]
92
93  subsystem_name = "inputmethod"
94  part_name = "imf"
95}
96
97ohos_shared_library("inputmethod_extension_module") {
98  branch_protector_ret = "pac_ret"
99  sanitize = {
100    cfi = true
101    cfi_cross_dso = true
102    debug = false
103  }
104  include_dirs = [ "${inputmethod_path}/common/include" ]
105
106  sources = [ "${inputmethod_path}/frameworks/kits/extension/src/inputmethod_extension_module_loader.cpp" ]
107
108  configs = [ ":ability_config" ]
109  public_configs = [ ":ability_public_config" ]
110
111  deps = [ ":inputmethod_extension" ]
112
113  external_deps = [
114    "ability_base:base",
115    "ability_base:want",
116    "ability_base:zuri",
117    "ability_runtime:abilitykit_native",
118    "ability_runtime:runtime",
119    "c_utils:utils",
120    "hilog:libhilog",
121    "napi:ace_napi",
122  ]
123
124  relative_install_dir = "extensionability/"
125  subsystem_name = "inputmethod"
126  part_name = "imf"
127}
128