1# Copyright (c) 2022 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("//foundation/graphic/graphic_2d/graphic_config.gni")
16
17## Build hello_native_image {{{
18config("hello_native_image_config") {
19  visibility = [ ":*" ]
20
21  cflags = [
22    "-Wall",
23    "-Werror",
24    "-g3",
25  ]
26}
27
28config("hello_native_image_public_config") {
29  include_dirs = [
30    "$graphic_2d_root/interfaces/inner_api/common",
31    "$graphic_2d_root/utils",
32    "//drivers/peripheral/base",
33    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
34  ]
35}
36
37ohos_executable("hello_native_image") {
38  install_enable = true
39
40  sources = []
41  if (surface_enable_gpu) {
42    sources += [ "hello_native_image.cpp" ]
43  } else {
44    sources += [ "hello_native_image_unsupported.cpp" ]
45  }
46
47  configs = [ ":hello_native_image_config" ]
48
49  public_configs = [ ":hello_native_image_public_config" ]
50
51  deps = [
52    "$graphic_2d_root/frameworks/opengl_wrapper:EGL",
53    "$graphic_2d_root/frameworks/opengl_wrapper:GLESv3",
54    "$graphic_2d_root/frameworks/surfaceimage:libnative_image",
55  ]
56
57  external_deps = [ "graphic_surface:surface" ]
58
59  part_name = "graphic_2d"
60  subsystem_name = "graphic"
61}
62
63## Build hello_native_image }}}
64
65