# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/ohos/sa_profile/sa_profile.gni") ohos_sa_profile("socperf_sa_profile") { sources = [ "sa_profile/1906.xml" ] part_name = "soc_perf" } ohos_prebuilt_etc("socperf_resource_config") { source = "configs/socperf_resource_config.xml" install_enable = true module_install_dir = "etc/soc_perf" part_name = "soc_perf" subsystem_name = "resourceschedule" } ohos_prebuilt_etc("socperf_boost_config") { source = "configs/socperf_boost_config.xml" install_enable = true module_install_dir = "etc/soc_perf" part_name = "soc_perf" subsystem_name = "resourceschedule" } group("socperf_config") { deps = [ ":socperf_boost_config", ":socperf_resource_config", ] } ohos_shared_library("socperf_server") { sources = [ "src/core/socperf.cpp", "src/core/socperf_handler.cpp", "src/server/socperf_server.cpp", "src/server/socperf_stub.cpp", ] include_dirs = [ "include", "include/server", "include/core", "//base/customization/config_policy/interfaces/innerkits/include", ] deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk", "//third_party/libxml2:xml2", ] external_deps = [ "c_utils:utils", "config_policy:configpolicy_util", "eventhandler:libeventhandler", "hitrace_native:hitrace_meter", ] part_name = "soc_perf" subsystem_name = "resourceschedule" } config("socperf_client_public_config") { include_dirs = [ "include", "include/client", ] } ohos_shared_library("socperf_client") { sources = [ "src/client/socperf_client.cpp", "src/client/socperf_proxy.cpp", ] include_dirs = [ "include", "include/client", "//foundation/systemabilitymgr/safwk/services/safwk/include", ] public_configs = [ ":socperf_client_public_config" ] deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", ] part_name = "soc_perf" subsystem_name = "resourceschedule" external_deps = [ "c_utils:utils" ] } ohos_executable("socperf_test") { sources = [ "test/unittest/socperf_test.cpp" ] include_dirs = [ "include", "include/client", ] deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", "//foundation/resourceschedule/resource_schedule_service/soc_perf:socperf_client", "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", ] install_enable = true part_name = "soc_perf" subsystem_name = "resourceschedule" external_deps = [ "c_utils:utils" ] }