1# Copyright (c) 2021-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("//build/ohos.gni") 15import("//foundation/window/window_manager/windowmanager_aafwk.gni") 16 17config("libwm_private_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "include", 22 "../wmserver/include", 23 "//foundation/arkui/napi", # because of ability_context.h 24 ] 25} 26 27config("libwm_public_config") { 28 include_dirs = [ 29 "../interfaces/innerkits/wm", 30 "../utils/include", 31 ] 32} 33 34## Build libwm.so 35ohos_shared_library("libwm") { 36 37 sources = [ 38 "../wmserver/src/zidl/window_manager_proxy.cpp", 39 "src/color_parser.cpp", 40 "src/input_transfer_station.cpp", 41 "src/static_call.cpp", 42 "src/vsync_station.cpp", 43 "src/window.cpp", 44 "src/window_accessibility_controller.cpp", 45 "src/window_adapter.cpp", 46 "src/window_agent.cpp", 47 "src/window_frame_trace_impl.cpp", 48 "src/window_impl.cpp", 49 "src/window_input_channel.cpp", 50 "src/window_manager.cpp", 51 "src/window_manager_agent.cpp", 52 "src/window_option.cpp", 53 "src/window_scene.cpp", 54 "src/zidl/window_manager_agent_stub.cpp", 55 "src/zidl/window_stub.cpp", 56 ] 57 58 configs = [ 59 ":libwm_private_config", 60 "//foundation/window/window_manager/resources/config/build:coverage_flags", 61 ] 62 63 public_configs = [ ":libwm_public_config" ] 64 65 deps = [ 66 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 67 "//foundation/window/window_manager/dm:libdm", 68 "//foundation/window/window_manager/utils:libwmutil", 69 ] 70 71 external_deps = [ 72 "ability_runtime:ability_context_native", 73 "ability_runtime:ability_manager", 74 "ace_engine:ace_uicontent", 75 "c_utils:utils", 76 "eventhandler:libeventhandler", 77 "graphic_standard:window_animation", 78 "hilog_native:libhilog", 79 "hisysevent_native:libhisysevent", 80 "input:libmmi-client", 81 "ipc:ipc_core", 82 "multimedia_image_framework:image_native", 83 "samgr:samgr_proxy", 84 ] 85 86 defines = [] 87 if (efficiency_manager_enable) { 88 external_deps += [ "efficiency_manager:suspend_manager_client" ] 89 defines += [ "EFFICIENCY_MANAGER_ENABLE" ] 90 } 91 92 if (defined(global_parts_info)) { 93 if (defined(global_parts_info.resourceschedule_frame_aware_sched) || 94 defined(global_parts_info.hmosresourceschedule_resourceschedule_frame_aware_sched_override)) { 95 defines += [ "FRAME_TRACE_ENABLE" ] 96 deps += [ "//foundation/resourceschedule/frame_aware_sched/interfaces/innerkits/frameintf:frame_trace_intf" ] 97 include_dirs = [ "//foundation/resourceschedule/frame_aware_sched/interfaces/innerkits/frameintf" ] 98 } 99 } 100 101 if (!defined(global_parts_info) || 102 defined(global_parts_info.resourceschedule_resource_schedule_service)) { 103 soc_perf_enable = true 104 } else { 105 soc_perf_enable = false 106 } 107 print("soc_perf_enable: ", soc_perf_enable) 108 109 if (soc_perf_enable == true) { 110 external_deps += [ "resource_schedule_service:ressched_client" ] 111 defines += [ "SOC_PERF_ENABLE" ] 112 } 113 114 if (!defined(global_parts_info) || 115 defined(global_parts_info.inputmethod_imf)) { 116 imf_enable = true 117 } else { 118 imf_enable = false 119 } 120 print("imf_enable: ", imf_enable) 121 122 if (imf_enable == true) { 123 external_deps += [ "imf:inputmethod_client" ] 124 defines += [ "IMF_ENABLE" ] 125 } 126 127 part_name = "window_manager" 128 subsystem_name = "window" 129} 130 131group("test") { 132 testonly = true 133 deps = [ "test:test" ] 134} 135