1# Copyright (c) 2023 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 17config("libdm_private_config") { 18 include_dirs = [ 19 "include", 20 "../dm/include", 21 "../dmserver/include", 22 ] 23} 24 25config("libdm_public_config") { 26 include_dirs = [ 27 "../interfaces/innerkits/dm", 28 "../interfaces/innerkits/dm_lite", 29 "../utils/include", 30 "../window_scene/session_manager/include", 31 "../wmserver/include", 32 ] 33} 34 35## Build libdm_lite.so 36ohos_shared_library("libdm_lite") { 37 branch_protector_ret = "pac_ret" 38 sanitize = { 39 cfi = true 40 cfi_cross_dso = true 41 cfi_vcall_icall_only = true 42 debug = false 43 } 44 sources = [ 45 "../dm/src/zidl/display_manager_agent_stub.cpp", 46 "src/display_lite.cpp", 47 "src/display_manager_adapter_lite.cpp", 48 "src/display_manager_lite.cpp", 49 "src/display_manager_lite_proxy.cpp", 50 "src/screen_manager_lite.cpp", 51 ] 52 53 configs = [ 54 ":libdm_private_config", 55 "../resources/config/build:coverage_flags", 56 ] 57 58 public_configs = [ ":libdm_public_config" ] 59 60 deps = [ "${window_base_path}/utils:libwmutil_base" ] 61 62 external_deps = [ 63 "c_utils:utils", 64 "hilog:libhilog", 65 "ipc:ipc_single", 66 "samgr:samgr_proxy", 67 ] 68 69 innerapi_tags = [ "platformsdk" ] 70 part_name = "window_manager" 71 subsystem_name = "window" 72 73 defines = [] 74 if (build_variant == "user") { 75 defines += [ "IS_RELEASE_VERSION" ] 76 } 77 78 if (window_manager_use_sceneboard) { 79 defines += [ "SCENE_BOARD_ENABLED" ] 80 } 81} 82 83group("test") { 84 testonly = true 85 if (window_manager_use_sceneboard) { 86 deps = [ "test:test" ] 87 } else { 88 deps = [] 89 } 90} 91