14ed2deddSopenharmony_ci# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
24ed2deddSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
34ed2deddSopenharmony_ci# you may not use this file except in compliance with the License.
44ed2deddSopenharmony_ci# You may obtain a copy of the License at
54ed2deddSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
64ed2deddSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
74ed2deddSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
84ed2deddSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
94ed2deddSopenharmony_ci# See the License for the specific language governing permissions and
104ed2deddSopenharmony_ci# limitations under the License.
114ed2deddSopenharmony_ci
124ed2deddSopenharmony_ciimport("//build/lite/config/component/lite_component.gni")
134ed2deddSopenharmony_ciimport("//build/lite/ndk/ndk.gni")
144ed2deddSopenharmony_ci
154ed2deddSopenharmony_cilite_component("surface_lite") {
164ed2deddSopenharmony_ci  features = [ ":surface" ]
174ed2deddSopenharmony_ci  public_deps = features
184ed2deddSopenharmony_ci}
194ed2deddSopenharmony_ci
204ed2deddSopenharmony_cindk_lib("surface_lite_ndk") {
214ed2deddSopenharmony_ci  lib_extension = ".so"
224ed2deddSopenharmony_ci  deps = [ ":surface" ]
234ed2deddSopenharmony_ci  head_files = [ "interfaces/kits" ]
244ed2deddSopenharmony_ci}
254ed2deddSopenharmony_ci
264ed2deddSopenharmony_cishared_library("surface") {
274ed2deddSopenharmony_ci  sources = [
284ed2deddSopenharmony_ci    "frameworks/buffer_client_producer.cpp",
294ed2deddSopenharmony_ci    "frameworks/buffer_manager.cpp",
304ed2deddSopenharmony_ci    "frameworks/buffer_queue.cpp",
314ed2deddSopenharmony_ci    "frameworks/buffer_queue_consumer.cpp",
324ed2deddSopenharmony_ci    "frameworks/buffer_queue_producer.cpp",
334ed2deddSopenharmony_ci    "frameworks/surface.cpp",
344ed2deddSopenharmony_ci    "frameworks/surface_buffer_impl.cpp",
354ed2deddSopenharmony_ci    "frameworks/surface_impl.cpp",
364ed2deddSopenharmony_ci  ]
374ed2deddSopenharmony_ci  include_dirs = [
384ed2deddSopenharmony_ci    "frameworks",
394ed2deddSopenharmony_ci    "//drivers/peripheral/base",
404ed2deddSopenharmony_ci    "//drivers/peripheral/display/interfaces/include",
414ed2deddSopenharmony_ci  ]
424ed2deddSopenharmony_ci  public_configs = [ ":surface_public_config" ]
434ed2deddSopenharmony_ci  public_deps = [ "//foundation/graphic/graphic_utils_lite:utils_lite" ]
444ed2deddSopenharmony_ci  deps = [
454ed2deddSopenharmony_ci    "//drivers/peripheral/display/hal:hdi_display",
464ed2deddSopenharmony_ci    "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
474ed2deddSopenharmony_ci    "//third_party/bounds_checking_function:libsec_shared",
484ed2deddSopenharmony_ci  ]
494ed2deddSopenharmony_ci  ldflags = [
504ed2deddSopenharmony_ci    "-ldisplay_gfx",
514ed2deddSopenharmony_ci    "-ldisplay_gralloc",
524ed2deddSopenharmony_ci    "-ldisplay_layer",
534ed2deddSopenharmony_ci  ]
544ed2deddSopenharmony_ci  cflags = [ "-fPIC" ]
554ed2deddSopenharmony_ci  cflags += [ "-Wall" ]
564ed2deddSopenharmony_ci  cflags_cc = cflags
574ed2deddSopenharmony_ci}
584ed2deddSopenharmony_ci
594ed2deddSopenharmony_ciconfig("surface_public_config") {
604ed2deddSopenharmony_ci  include_dirs = [
614ed2deddSopenharmony_ci    "interfaces/innerkits",
624ed2deddSopenharmony_ci    "interfaces/kits",
634ed2deddSopenharmony_ci    "//foundation/graphic/graphic_utils_lite/interfaces/kits",
644ed2deddSopenharmony_ci  ]
654ed2deddSopenharmony_ci}
66