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 "soc_perf:socperf_client", 62 ] 63 64 part_name = "arkxtest" 65 subsystem_name = "testfwk" 66} 67 68config("test_server_client_config") { 69 visibility = [ ":*" ] 70 include_dirs = [ 71 "client", 72 "utils", 73 "${target_gen_dir}", 74 ] 75} 76 77ohos_shared_library("test_server_client") { 78 public_configs = [ ":test_server_client_config" ] 79 80 output_values = get_target_outputs(":test_server_interface") 81 sources = [ 82 "${target_gen_dir}/test_server_interface_proxy.cpp", 83 "client/test_server_client.cpp", 84 ] 85 sources += 86 filter_include(output_values, [ "test_server_interface_proxy.cpp" ]) 87 88 deps = [ ":test_server_interface" ] 89 90 external_deps = [ 91 "c_utils:utils", 92 "common_event_service:cesfwk_innerkits", 93 "hilog:libhilog", 94 "ipc:ipc_core", 95 "samgr:samgr_proxy", 96 ] 97 98 part_name = "arkxtest" 99 subsystem_name = "testfwk" 100} 101