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.
13import("//build/config/ohos/config.gni")
14import("//build/ohos.gni")
15import("//foundation/arkui/napi/napi.gni")
16comPath =
17    "../../../../../../../../../foundation/arkui/ace_engine/interfaces/native"
18compath2 = "../../../../../../../../../foundation/graphic/graphic_2d/frameworks/opengl_wrapper"
19compath3 = "../../../../../../../../../base/hiviewdfx/hilog"
20config("config") {
21  visibility = [ ":*" ]
22
23  cflags = [
24    "-Wall",
25    "-Werror",
26    "-g3",
27    "-Wunused-variable",
28  ]
29}
30
31config("public_config") {
32}
33
34ohos_shared_library("nativerender") {
35  testonly = true
36  sources = [
37    "./napi/napi_init.cpp",
38    "./plugin_manager.cpp",
39    "./render/egl_core.cpp",
40    "./render/plugin_render.cpp",
41  ]
42  subsystem_name = "arkui"
43  part_name = "ace_engine"
44  if (use_musl) {
45    stl = "c++_shared"
46  }
47  include_dirs = [
48    ".",
49    "./common",
50    "./napi",
51    "./render",
52    "$comPath",
53    "$compath3/interfaces/native/kits/include",
54  ]
55  configs = [
56    ":config",
57    "//third_party/EGL:libEGL_public_config",
58    "//third_party/openGLES:libGLES_public_config",
59  ]
60  external_deps = [
61    "hilog:hilog_ndk",
62    "napi:ace_napi",
63  ]
64  deps = [
65    "$comPath:ace_ndk",
66    "$compath2:EGL",
67    "$compath2:GLESv3",
68    "$compath3/frameworks/hilog_ndk:hilog_ndk",
69  ]
70
71  output_extension = "so"
72}
73