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") 16import("//foundation/graphic/graphic_2d/rosen/modules/effect/effect_config.gni") 17 18## Build libegl_effect.so 19 20ohos_shared_library("libegl_effect") { 21 include_dirs = [ 22 "$graphic_2d_root/interfaces/inner_api/surface", 23 "//third_party/EGL/api", 24 "//third_party/openGLES/api", 25 "$graphic_2d_root/utils/log", 26 "include", 27 ] 28 29 cflags = [ 30 "-Wall", 31 "-Werror", 32 "-g3", 33 "-Wall", 34 "-Wno-pointer-arith", 35 "-Wno-non-virtual-dtor", 36 "-Wno-missing-field-initializers", 37 "-Wno-c++11-narrowing", 38 ] 39 40 cflags_cc = [ "-std=c++17" ] 41 42 sources = [] 43 44 deps = [] 45 46 external_deps = [ "hilog:libhilog" ] 47 48 if (effect_enable_gpu) { 49 sources += [ "src/egl_manager.cpp" ] 50 51 deps += [ "$graphic_2d_root:libgl" ] 52 } 53 54 if (effect_enable_gpu) { 55 install_enable = true 56 } else { 57 install_enable = false 58 } 59 60 innerapi_tags = [ "platformsdk_indirect" ] 61 part_name = "graphic_2d" 62 subsystem_name = "graphic" 63} 64