1# Copyright (c) 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("../windowmanager_aafwk.gni") 16 17## Build libdms.so 18config("libdms_private_config") { 19 include_dirs = [ 20 "../dm/include", 21 "../interfaces/innerkits/dm", 22 ] 23} 24 25config("libdms_public_config") { 26 include_dirs = [ "include" ] 27} 28 29ohos_shared_library("libdms") { 30 sources = [ 31 "../dm/src/zidl/display_manager_agent_proxy.cpp", 32 "src/abstract_display.cpp", 33 "src/abstract_display_controller.cpp", 34 "src/abstract_screen.cpp", 35 "src/abstract_screen_controller.cpp", 36 "src/display_cutout_controller.cpp", 37 "src/display_dumper.cpp", 38 "src/display_manager_agent_controller.cpp", 39 "src/display_manager_config.cpp", 40 "src/display_manager_service.cpp", 41 "src/display_manager_service_inner.cpp", 42 "src/display_manager_stub.cpp", 43 "src/display_power_controller.cpp", 44 "src/screen_rotation_controller.cpp", 45 "src/sensor_connector.cpp", 46 ] 47 48 configs = [ 49 ":libdms_private_config", 50 "../resources/config/build:coverage_flags", 51 ] 52 53 public_configs = [ ":libdms_public_config" ] 54 55 deps = [ 56 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 57 "../utils:libwmutil", 58 "//third_party/libxml2:libxml2", 59 ] 60 61 external_deps = [ 62 "c_utils:utils", 63 "config_policy:configpolicy_util", 64 "eventhandler:libeventhandler", 65 "graphic_2d:librender_service_client", 66 "graphic_2d:surface", 67 "hilog:libhilog", 68 "hitrace:hitrace_meter", 69 "ipc:ipc_single", 70 "safwk:system_ability_fwk", 71 "sensor:sensor_interface_native", 72 ] 73 74 if (defined(use_new_skia) && use_new_skia) { 75 include_dirs = [ "//third_party/skia/src" ] 76 } else { 77 include_dirs = [ "//third_party/flutter/skia/src" ] 78 } 79 80 defines = [] 81 if (window_manager_feature_subscribe_motion) { 82 if (defined(global_parts_info) && defined(global_parts_info.msdp_motion)) { 83 external_deps += [ "motion:motion_interface_native" ] 84 defines += [ "WM_SUBSCRIBE_MOTION_ENABLE" ] 85 } 86 } 87 88 if (is_standard_system) { 89 external_deps += [ "init:libbegetutil" ] 90 } else { 91 external_deps += [ "init_lite:libbegetutil" ] 92 } 93 94 if (defined(global_parts_info) && 95 defined(global_parts_info.resourceschedule_soc_perf)) { 96 external_deps += [ "soc_perf:socperf_client" ] 97 defines += [ "SOC_PERF_ENABLE" ] 98 } 99 100 part_name = "window_manager" 101 subsystem_name = "window" 102} 103 104group("test") { 105 testonly = true 106 deps = [ "test:test" ] 107} 108