1# Copyright (C) 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("inputmethod_tdd_util_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ "./" ] 20 ldflags = [ "-Wl,--exclude-libs=ALL" ] 21 cflags = [ 22 "-fdata-sections", 23 "-ffunction-sections", 24 "-fvisibility=hidden", 25 ] 26} 27 28config("inputmethod_tdd_util_public_config") { 29 visibility = [ "./*" ] 30 include_dirs = [ 31 "include", 32 "${inputmethod_path}/services/adapter/settings_data_provider/common/include", 33 ] 34} 35 36ohos_static_library("inputmethod_tdd_util") { 37 branch_protector_ret = "pac_ret" 38 sanitize = { 39 cfi = true 40 cfi_cross_dso = true 41 debug = false 42 } 43 sources = [ 44 "src/key_event_util.cpp", 45 "src/tdd_util.cpp", 46 ] 47 configs = [ 48 ":inputmethod_tdd_util_config", 49 "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:inputmethod_ability_native_public_config", 50 "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:inputmethod_client_native_public_config", 51 ] 52 public_configs = [ ":inputmethod_tdd_util_public_config" ] 53 deps = [ 54 "${inputmethod_path}/services:inputmethod_service", 55 "${inputmethod_path}/services/adapter/settings_data_provider:settings_data_static", 56 ] 57 external_deps = [ 58 "access_token:libaccesstoken_sdk", 59 "access_token:libnativetoken", 60 "access_token:libtoken_setproc", 61 "ability_runtime:ability_connect_callback_stub", 62 "bundle_framework:appexecfwk_base", 63 "bundle_framework:appexecfwk_core", 64 "cJSON:cjson", 65 "data_share:datashare_common", 66 "data_share:datashare_consumer", 67 "eventhandler:libeventhandler", 68 "hilog:libhilog", 69 "input:libmmi-client", 70 "ipc:ipc_single", 71 "os_account:os_account_innerkits", 72 "safwk:system_ability_fwk", 73 "samgr:samgr_proxy", 74 "window_manager:libdm_lite", 75 "window_manager:libwsutils", 76 ] 77 78 if (window_manager_use_sceneboard) { 79 external_deps += [ "window_manager:libwm_lite" ] 80 } else { 81 external_deps += [ "window_manager:libwm" ] 82 } 83 84 subsystem_name = "inputmethod" 85 part_name = "imf" 86} 87