1# Copyright (c) 2024 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("//build/ohos.gni") 15import("//foundation/ability/idl_tool/idl_config.gni") 16 17idl_interface_sources = [ 18 "${target_gen_dir}/test_server_interface_proxy.cpp", 19 "${target_gen_dir}/test_server_interface_stub.cpp", 20] 21 22idl_gen_interface("test_server_interface") { 23 src_idl = rebase_path("ITestServerInterface.idl") 24 dst_file = string_join(",", idl_interface_sources) 25 log_domainid = "0xD003110" 26 log_tag = "TestServerIPC" 27} 28 29config("test_server_service_config") { 30 visibility = [ ":*" ] 31 include_dirs = [ 32 "service", 33 "client", 34 "utils", 35 "${target_gen_dir}", 36 ] 37 cflags_cc = [ "-fexceptions" ] 38} 39 40ohos_shared_library("test_server_service") { 41 configs = [ ":test_server_service_config" ] 42 43 output_values = get_target_outputs(":test_server_interface") 44 sources = [ 45 "${target_gen_dir}/test_server_interface_stub.cpp", 46 "service/test_server_service.cpp", 47 ] 48 sources += filter_include(output_values, [ "test_server_interface_stub.cpp" ]) 49 50 deps = [ ":test_server_interface" ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "common_event_service:cesfwk_innerkits", 55 "hilog:libhilog", 56 "init:libbegetutil", 57 "ipc:ipc_core", 58 "pasteboard:pasteboard_client", 59 "safwk:system_ability_fwk", 60 "samgr:samgr_proxy", 61 ] 62 63 part_name = "arkxtest" 64 subsystem_name = "testfwk" 65} 66 67config("test_server_client_config") { 68 visibility = [ ":*" ] 69 include_dirs = [ 70 "client", 71 "utils", 72 "${target_gen_dir}", 73 ] 74} 75 76ohos_shared_library("test_server_client") { 77 public_configs = [ ":test_server_client_config" ] 78 79 output_values = get_target_outputs(":test_server_interface") 80 sources = [ 81 "${target_gen_dir}/test_server_interface_proxy.cpp", 82 "client/test_server_client.cpp", 83 ] 84 sources += 85 filter_include(output_values, [ "test_server_interface_proxy.cpp" ]) 86 87 deps = [ ":test_server_interface" ] 88 89 external_deps = [ 90 "c_utils:utils", 91 "common_event_service:cesfwk_innerkits", 92 "hilog:libhilog", 93 "ipc:ipc_core", 94 "samgr:samgr_proxy", 95 ] 96 97 part_name = "arkxtest" 98 subsystem_name = "testfwk" 99} 100