1e9297d28Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.. All rights reserved. 2e9297d28Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3e9297d28Sopenharmony_ci# you may not use this file except in compliance with the License. 4e9297d28Sopenharmony_ci# You may obtain a copy of the License at 5e9297d28Sopenharmony_ci# 6e9297d28Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7e9297d28Sopenharmony_ci# 8e9297d28Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9e9297d28Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10e9297d28Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11e9297d28Sopenharmony_ci# See the License for the specific language governing permissions and 12e9297d28Sopenharmony_ci# limitations under the License. 13e9297d28Sopenharmony_ci 14e9297d28Sopenharmony_ciimport("//build/ohos.gni") 15e9297d28Sopenharmony_ciimport("//foundation/graphic/graphic_2d/graphic_config.gni") 16e9297d28Sopenharmony_ci 17e9297d28Sopenharmony_ciconfig("texgine_drawing_public_config") { 18e9297d28Sopenharmony_ci include_dirs = [ 19e9297d28Sopenharmony_ci "./src", 20e9297d28Sopenharmony_ci "../export", 21e9297d28Sopenharmony_ci ] 22e9297d28Sopenharmony_ci cflags = [ 23e9297d28Sopenharmony_ci "-Wall", 24e9297d28Sopenharmony_ci "-Werror", 25e9297d28Sopenharmony_ci "-g3", 26e9297d28Sopenharmony_ci "-std=c++17", 27e9297d28Sopenharmony_ci ] 28e9297d28Sopenharmony_ci} 29e9297d28Sopenharmony_ci 30e9297d28Sopenharmony_ciif (defined(use_rosen_drawing) && use_rosen_drawing) { 31e9297d28Sopenharmony_ci ohos_source_set("libtexgine_drawing") { 32e9297d28Sopenharmony_ci public_configs = [ ":texgine_drawing_public_config" ] 33e9297d28Sopenharmony_ci include_dirs = [ 34e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/render_service_base/include", 35e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/2d_graphics/src/drawing/engine_adapter", 36e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/2d_graphics/include", 37e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/2d_graphics/src", 38e9297d28Sopenharmony_ci ] 39e9297d28Sopenharmony_ci 40e9297d28Sopenharmony_ci platform = current_os 41e9297d28Sopenharmony_ci if (platform == "mingw") { 42e9297d28Sopenharmony_ci platform = "windows" 43e9297d28Sopenharmony_ci } 44e9297d28Sopenharmony_ci 45e9297d28Sopenharmony_ci if (is_arkui_x) { 46e9297d28Sopenharmony_ci public_deps = [ "//third_party/skia:skia_$platform" ] 47e9297d28Sopenharmony_ci } else { 48e9297d28Sopenharmony_ci public_external_deps = [ "skia:skia_canvaskit" ] 49e9297d28Sopenharmony_ci } 50e9297d28Sopenharmony_ci deps = [] 51e9297d28Sopenharmony_ci if (is_arkui_x) { 52e9297d28Sopenharmony_ci deps += [ "//third_party/bounds_checking_function:libsec_static" ] 53e9297d28Sopenharmony_ci } 54e9297d28Sopenharmony_ci 55e9297d28Sopenharmony_ci if (defined(use_rosen_drawing) && use_rosen_drawing) { 56e9297d28Sopenharmony_ci defines = [ "USE_ROSEN_DRAWING" ] 57e9297d28Sopenharmony_ci if (rs_enable_gpu) { 58e9297d28Sopenharmony_ci defines += [ "RS_ENABLE_GPU" ] 59e9297d28Sopenharmony_ci } 60e9297d28Sopenharmony_ci } 61e9297d28Sopenharmony_ci 62e9297d28Sopenharmony_ci part_name = "graphic_2d" 63e9297d28Sopenharmony_ci subsystem_name = "graphic" 64e9297d28Sopenharmony_ci } 65e9297d28Sopenharmony_ci} else { 66e9297d28Sopenharmony_ci ohos_shared_library("libtexgine_drawing") { 67e9297d28Sopenharmony_ci public_configs = [ ":texgine_drawing_public_config" ] 68e9297d28Sopenharmony_ci 69e9297d28Sopenharmony_ci platform = current_os 70e9297d28Sopenharmony_ci if (platform == "mingw") { 71e9297d28Sopenharmony_ci platform = "windows" 72e9297d28Sopenharmony_ci } 73e9297d28Sopenharmony_ci 74e9297d28Sopenharmony_ci public_external_deps = [ "skia:skia_canvaskit" ] 75e9297d28Sopenharmony_ci 76e9297d28Sopenharmony_ci deps = [] 77e9297d28Sopenharmony_ci 78e9297d28Sopenharmony_ci if (is_cross_platform) { 79e9297d28Sopenharmony_ci public_deps += [ "//foundation/appframework/icu_data:static_icudata" ] 80e9297d28Sopenharmony_ci } 81e9297d28Sopenharmony_ci 82e9297d28Sopenharmony_ci innerapi_tags = [ "platformsdk" ] 83e9297d28Sopenharmony_ci part_name = "graphic_2d" 84e9297d28Sopenharmony_ci subsystem_name = "graphic" 85e9297d28Sopenharmony_ci } 86e9297d28Sopenharmony_ci} 87