1# Copyright (c) 2020-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# http://www.apache.org/licenses/LICENSE-2.0 6# Unless required by applicable law or agreed to in writing, software 7# distributed under the License is distributed on an "AS IS" BASIS, 8# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 9# See the License for the specific language governing permissions and 10# limitations under the License. 11 12import("//build/lite/config/component/lite_component.gni") 13import("//build/lite/ndk/ndk.gni") 14 15lite_component("surface_lite") { 16 features = [ ":surface" ] 17 public_deps = features 18} 19 20ndk_lib("surface_lite_ndk") { 21 lib_extension = ".so" 22 deps = [ ":surface" ] 23 head_files = [ "interfaces/kits" ] 24} 25 26shared_library("surface") { 27 sources = [ 28 "frameworks/buffer_client_producer.cpp", 29 "frameworks/buffer_manager.cpp", 30 "frameworks/buffer_queue.cpp", 31 "frameworks/buffer_queue_consumer.cpp", 32 "frameworks/buffer_queue_producer.cpp", 33 "frameworks/surface.cpp", 34 "frameworks/surface_buffer_impl.cpp", 35 "frameworks/surface_impl.cpp", 36 ] 37 include_dirs = [ 38 "frameworks", 39 "//drivers/peripheral/base", 40 "//drivers/peripheral/display/interfaces/include", 41 ] 42 public_configs = [ ":surface_public_config" ] 43 public_deps = [ "//foundation/graphic/graphic_utils_lite:utils_lite" ] 44 deps = [ 45 "//drivers/peripheral/display/hal:hdi_display", 46 "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", 47 "//third_party/bounds_checking_function:libsec_shared", 48 ] 49 ldflags = [ 50 "-ldisplay_gfx", 51 "-ldisplay_gralloc", 52 "-ldisplay_layer", 53 ] 54 cflags = [ "-fPIC" ] 55 cflags += [ "-Wall" ] 56 cflags_cc = cflags 57} 58 59config("surface_public_config") { 60 include_dirs = [ 61 "interfaces/innerkits", 62 "interfaces/kits", 63 "//foundation/graphic/graphic_utils_lite/interfaces/kits", 64 ] 65} 66