122736c2fSopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd.
222736c2fSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
322736c2fSopenharmony_ci# you may not use this file except in compliance with the License.
422736c2fSopenharmony_ci# You may obtain a copy of the License at
522736c2fSopenharmony_ci#
622736c2fSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
722736c2fSopenharmony_ci#
822736c2fSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
922736c2fSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1022736c2fSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1122736c2fSopenharmony_ci# See the License for the specific language governing permissions and
1222736c2fSopenharmony_ci# limitations under the License.
1322736c2fSopenharmony_ci
1422736c2fSopenharmony_ciimport("//base/inputmethod/imf/inputmethod.gni")
1522736c2fSopenharmony_ciimport("//build/ohos.gni")
1622736c2fSopenharmony_ci
1722736c2fSopenharmony_ciconfig("ability_config") {
1822736c2fSopenharmony_ci  visibility = [ ":*" ]
1922736c2fSopenharmony_ci
2022736c2fSopenharmony_ci  cflags = []
2122736c2fSopenharmony_ci  if (target_cpu == "arm") {
2222736c2fSopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
2322736c2fSopenharmony_ci  }
2422736c2fSopenharmony_ci  defines = [
2522736c2fSopenharmony_ci    "APP_LOG_TAG = \"Ability\"",
2622736c2fSopenharmony_ci    "LOG_DOMAIN = 0xD002200",
2722736c2fSopenharmony_ci  ]
2822736c2fSopenharmony_ci}
2922736c2fSopenharmony_ci
3022736c2fSopenharmony_ciconfig("ability_public_config") {
3122736c2fSopenharmony_ci  visibility = [ ":*" ]
3222736c2fSopenharmony_ci  include_dirs = [ "${inputmethod_path}/frameworks/kits/extension/include" ]
3322736c2fSopenharmony_ci}
3422736c2fSopenharmony_ci
3522736c2fSopenharmony_ciohos_shared_library("inputmethod_extension") {
3622736c2fSopenharmony_ci  branch_protector_ret = "pac_ret"
3722736c2fSopenharmony_ci  sanitize = {
3822736c2fSopenharmony_ci    cfi = true
3922736c2fSopenharmony_ci    cfi_cross_dso = true
4022736c2fSopenharmony_ci    debug = false
4122736c2fSopenharmony_ci  }
4222736c2fSopenharmony_ci  cflags_cc = [
4322736c2fSopenharmony_ci    "-fdata-sections",
4422736c2fSopenharmony_ci    "-ffunction-sections",
4522736c2fSopenharmony_ci    "-Os",
4622736c2fSopenharmony_ci  ]
4722736c2fSopenharmony_ci  include_dirs = [
4822736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/js/napi/common",
4922736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/js/napi/inputmethodclient",
5022736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/kits/extension/include",
5122736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/native/inputmethod_controller/include",
5222736c2fSopenharmony_ci    "${inputmethod_path}/interfaces/inner_api/inputmethod_controller/include",
5322736c2fSopenharmony_ci    "${inputmethod_path}/common/include",
5422736c2fSopenharmony_ci  ]
5522736c2fSopenharmony_ci
5622736c2fSopenharmony_ci  sources = [
5722736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/js/napi/inputmethodclient/js_utils.cpp",
5822736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/kits/extension/src/inputmethod_extension.cpp",
5922736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/kits/extension/src/inputmethod_extension_context.cpp",
6022736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/kits/extension/src/js_inputmethod_extension.cpp",
6122736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/kits/extension/src/js_inputmethod_extension_context.cpp",
6222736c2fSopenharmony_ci  ]
6322736c2fSopenharmony_ci  configs = [ ":ability_config" ]
6422736c2fSopenharmony_ci  public_configs = [ ":ability_public_config" ]
6522736c2fSopenharmony_ci
6622736c2fSopenharmony_ci  deps = [
6722736c2fSopenharmony_ci    "${inputmethod_path}/common:inputmethod_common",
6822736c2fSopenharmony_ci    "${inputmethod_path}/frameworks/js/napi/common:inputmethod_js_common",
6922736c2fSopenharmony_ci    "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:inputmethod_ability",
7022736c2fSopenharmony_ci  ]
7122736c2fSopenharmony_ci
7222736c2fSopenharmony_ci  external_deps = [
7322736c2fSopenharmony_ci    "ability_base:configuration",
7422736c2fSopenharmony_ci    "ability_base:want",
7522736c2fSopenharmony_ci    "ability_runtime:ability_context_native",
7622736c2fSopenharmony_ci    "ability_runtime:ability_manager",
7722736c2fSopenharmony_ci    "ability_runtime:ability_start_options",
7822736c2fSopenharmony_ci    "ability_runtime:abilitykit_native",
7922736c2fSopenharmony_ci    "ability_runtime:app_context",
8022736c2fSopenharmony_ci    "ability_runtime:extensionkit_native",
8122736c2fSopenharmony_ci    "ability_runtime:napi_common",
8222736c2fSopenharmony_ci    "ability_runtime:runtime",
8322736c2fSopenharmony_ci    "c_utils:utils",
8422736c2fSopenharmony_ci    "eventhandler:libeventhandler",
8522736c2fSopenharmony_ci    "hilog:libhilog",
8622736c2fSopenharmony_ci    "i18n:intl_util",
8722736c2fSopenharmony_ci    "input:libmmi-client",
8822736c2fSopenharmony_ci    "ipc:ipc_napi",
8922736c2fSopenharmony_ci    "ipc:ipc_single",
9022736c2fSopenharmony_ci    "napi:ace_napi",
9122736c2fSopenharmony_ci    "samgr:samgr_proxy",
9222736c2fSopenharmony_ci    "window_manager:libdm",
9322736c2fSopenharmony_ci  ]
9422736c2fSopenharmony_ci
9522736c2fSopenharmony_ci  subsystem_name = "inputmethod"
9622736c2fSopenharmony_ci  part_name = "imf"
9722736c2fSopenharmony_ci}
9822736c2fSopenharmony_ci
9922736c2fSopenharmony_ciohos_shared_library("inputmethod_extension_module") {
10022736c2fSopenharmony_ci  branch_protector_ret = "pac_ret"
10122736c2fSopenharmony_ci  sanitize = {
10222736c2fSopenharmony_ci    cfi = true
10322736c2fSopenharmony_ci    cfi_cross_dso = true
10422736c2fSopenharmony_ci    debug = false
10522736c2fSopenharmony_ci  }
10622736c2fSopenharmony_ci  include_dirs = [ "${inputmethod_path}/common/include" ]
10722736c2fSopenharmony_ci
10822736c2fSopenharmony_ci  sources = [ "${inputmethod_path}/frameworks/kits/extension/src/inputmethod_extension_module_loader.cpp" ]
10922736c2fSopenharmony_ci
11022736c2fSopenharmony_ci  configs = [ ":ability_config" ]
11122736c2fSopenharmony_ci  public_configs = [ ":ability_public_config" ]
11222736c2fSopenharmony_ci
11322736c2fSopenharmony_ci  deps = [ ":inputmethod_extension" ]
11422736c2fSopenharmony_ci
11522736c2fSopenharmony_ci  external_deps = [
11622736c2fSopenharmony_ci    "ability_base:base",
11722736c2fSopenharmony_ci    "ability_base:want",
11822736c2fSopenharmony_ci    "ability_base:zuri",
11922736c2fSopenharmony_ci    "ability_runtime:abilitykit_native",
12022736c2fSopenharmony_ci    "ability_runtime:runtime",
12122736c2fSopenharmony_ci    "c_utils:utils",
12222736c2fSopenharmony_ci    "hilog:libhilog",
12322736c2fSopenharmony_ci    "napi:ace_napi",
12422736c2fSopenharmony_ci  ]
12522736c2fSopenharmony_ci
12622736c2fSopenharmony_ci  relative_install_dir = "extensionability/"
12722736c2fSopenharmony_ci  subsystem_name = "inputmethod"
12822736c2fSopenharmony_ci  part_name = "imf"
12922736c2fSopenharmony_ci}
130