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/surface", 31 "$graphic_2d_root/frameworks/surface/include", 32 "$graphic_2d_root/interfaces/inner_api/common", 33 "$graphic_2d_root/utils", 34 "//drivers/peripheral/base", 35 "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 36 ] 37} 38 39ohos_executable("hello_native_image") { 40 install_enable = true 41 42 sources = [] 43 if (surface_enable_gpu) { 44 sources += [ "hello_native_image.cpp" ] 45 } else { 46 sources += [ "hello_native_image_unsupported.cpp" ] 47 } 48 49 configs = [ ":hello_native_image_config" ] 50 51 public_configs = [ ":hello_native_image_public_config" ] 52 53 deps = [ 54 "$graphic_2d_root:libgl", 55 "$graphic_2d_root/frameworks/surface:surface", 56 "$graphic_2d_root/frameworks/surfaceimage:libnative_image", 57 ] 58 59 part_name = "graphic_2d" 60 subsystem_name = "graphic" 61} 62 63## Build hello_native_image }}} 64 65