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}/frameworks/inputmethod_ability/include", 22 "${inputmethod_path}/frameworks/inputmethod_controller/include", 23 "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include", 24 ] 25 ldflags = [ "-Wl,--exclude-libs=ALL" ] 26 cflags = [ 27 "-fdata-sections", 28 "-ffunction-sections", 29 "-fvisibility=hidden", 30 ] 31} 32 33config("inputmethodengine_native_public_config") { 34 visibility = [] 35 include_dirs = [ 36 "include", 37 "${inputmethod_path}/interfaces/kits/js/napi/inputmethodclient", 38 "${inputmethod_path}/interfaces/kits/js/napi/inputmethodengine/include", 39 "${inputmethod_path}/interfaces/kits/js/napi/inputmethodability", 40 ] 41} 42 43ohos_shared_library("inputmethodengine") { 44 sources = [ 45 "${inputmethod_path}/interfaces/kits/js/napi/inputmethodclient/async_call.cpp", 46 "${inputmethod_path}/interfaces/kits/js/napi/inputmethodclient/js_utils.cpp", 47 "//base/inputmethod/imf/services/src/global.cpp", 48 "input_method_engine_module.cpp", 49 "js_callback_object.cpp", 50 "js_input_method_engine_setting.cpp", 51 "js_keyboard_controller_engine.cpp", 52 "js_keyboard_delegate_setting.cpp", 53 "js_text_input_client_engine.cpp", 54 ] 55 56 configs = [ ":inputmethodengine_native_config" ] 57 58 deps = [ 59 "//base/inputmethod/imf/frameworks/inputmethod_ability:inputmethod_ability", 60 ] 61 62 external_deps = [ 63 "ability_runtime:abilitykit_native", 64 "c_utils:utils", 65 "hiviewdfx_hilog_native:libhilog", 66 "ipc:ipc_core", 67 ] 68 69 public_configs = [ ":inputmethodengine_native_public_config" ] 70 71 relative_install_dir = "module" 72 subsystem_name = "inputmethod" 73 part_name = "imf" 74} 75