1# Copyright (c) 2021 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 14if (defined(ohos_lite)) { 15 import("//build/lite/config/component/lite_component.gni") 16 import("//build/lite/ndk/ndk.gni") 17 board = board_name 18 if (board_name == "hispark_taurus" || board_name == "aegis_hi3516dv300") { 19 board = "hi3516dv300" 20 } else if (board_name == "hispark_aries") { 21 board = "hi3518ev300" 22 } 23 24 if (ohos_build_compiler == "clang" && ohos_kernel_type == "liteos_a") { 25 copy("display_layer") { 26 sources = [ "${board}/liteos_a/lib/libdisplay_layer.so" ] 27 outputs = [ "$root_out_dir/libdisplay_layer.so" ] 28 } 29 30 copy("display_gfx") { 31 sources = [ "${board}/liteos_a/lib/libdisplay_gfx.so" ] 32 outputs = [ "$root_out_dir/libdisplay_gfx.so" ] 33 } 34 35 copy("display_gralloc") { 36 sources = [ "${board}/liteos_a/lib/libdisplay_gralloc.so" ] 37 outputs = [ "$root_out_dir/libdisplay_gralloc.so" ] 38 } 39 } else if (ohos_build_compiler == "clang" && ohos_kernel_type == "linux") { 40 copy("display_layer") { 41 sources = [ "${board}/linux_small/lib/libdisplay_layer.so" ] 42 outputs = [ "$root_out_dir/libdisplay_layer.so" ] 43 } 44 45 copy("display_gfx") { 46 sources = [ "${board}/linux_small/lib/libdisplay_gfx.so" ] 47 outputs = [ "$root_out_dir/libdisplay_gfx.so" ] 48 } 49 50 copy("display_gralloc") { 51 sources = [ "${board}/linux_small/lib/libdisplay_gralloc.so" ] 52 outputs = [ "$root_out_dir/libdisplay_gralloc.so" ] 53 } 54 } 55 56 group("hdi_display") { 57 deps = [ 58 ":display_gfx", 59 ":display_gralloc", 60 ":display_layer", 61 ] 62 } 63} else { 64 import("//build/ohos.gni") 65 66 group("display_gralloc") { 67 deps = [ 68 "//drivers/peripheral/display/hal/default_standard:def_display_gralloc", 69 ] 70 if (device_name == "hispark_phoenix") { 71 deps += [ "source/display_gralloc:hisi_display_gralloc" ] 72 } 73 } 74 75 group("display_device") { 76 deps = [ 77 "//drivers/peripheral/display/hal/default_standard:def_display_device", 78 ] 79 if (device_name == "hispark_phoenix") { 80 deps += [ "hi3751v350/linux_standard/adapter:display_adapter_impl" ] 81 } 82 } 83 84 group("display_layer") { 85 if (device_name == "hispark_phoenix") { 86 deps = [ ":display_device" ] 87 } else { 88 deps = [ ":display_layer_lib" ] 89 } 90 } 91 92 ohos_prebuilt_shared_library("display_gfx") { 93 if (target_cpu == "arm") { 94 source = "hi3516dv300/linux_standard/lib/libdisplay_gfx.z.so" 95 } else { 96 source = "hi3516dv300/linux_standard/lib64/libdisplay_gfx.z.so" 97 } 98 install_images = [ chipset_base_dir ] 99 subsystem_name = "hdf" 100 part_name = "drivers_peripheral_display" 101 } 102 103 ohos_prebuilt_shared_library("display_layer_lib") { 104 if (target_cpu == "arm") { 105 source = "hi3516dv300/linux_standard/lib/libdisplay_layer.z.so" 106 } else { 107 source = "hi3516dv300/linux_standard/lib64/libdisplay_layer.z.so" 108 } 109 install_images = [ chipset_base_dir ] 110 subsystem_name = "hdf" 111 part_name = "drivers_peripheral_display" 112 } 113} 114