1# Copyright (c) 2023 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_3d/lume/lume_config.gni") 16 17config("lume_font_api") { 18 include_dirs = [ "api" ] 19 20 defines = [] 21} 22 23config("lume_font_config") { 24 include_dirs = [ "src/" ] 25 26 defines = [ "CORE_PLUGIN=1" ] 27 28 ldflags = [ 29 # "-Wl,--build-id", 30 "-Wl,--exclude-libs,ALL", 31 # "-Wl,--exclude-libs,libPluginDotfield", 32 ] 33 34 cflags = [ 35 "-Wno-unused-function", 36 "-Wno-unused-parameter", 37 "-Wno-sign-compare", 38 "-Wno-unused-variable", 39 "-Wno-unused-private-field", 40 "-Wno-tautological-unsigned-zero-compare", 41 "-Wno-logical-op-parentheses", 42 "-Wno-unused-local-typedef", 43 "-fvisibility=hidden", 44 "-ffunction-sections", 45 "-fdata-sections", 46 "-Wno-ignored-qualifiers", 47 "-fno-rtti", 48 ] 49 cflags_cc = [ 50 "-std=c++17", 51 "-Wno-overloaded-virtual", 52 "-Wno-thread-safety-attributes", 53 "-Wno-missing-braces", 54 ] 55} 56 57ohos_source_set("lume_font_src") { 58 public_configs = [ 59 ":lume_font_api", 60 ":lume_font_config", 61 62 # "${LUME_CORE3D_PATH}:lume_3d_api", 63 "${LUME_RENDER_PATH}:lume_render_api", 64 "${LUME_CORE_PATH}:lume_base_api", 65 "${LUME_CORE_PATH}:lume_engine_api", 66 67 # "${LUME_CORE_PATH}:lume_component_help_config", 68 # "${LUME_CORE_PATH}:lume_default", 69 ] 70 71 sources = [ 72 "src/face_data.cpp", 73 "src/face_data.h", 74 "src/font.cpp", 75 "src/font.h", 76 "src/font_buffer.cpp", 77 "src/font_buffer.h", 78 "src/font_data.cpp", 79 "src/font_data.h", 80 "src/font_defs.h", 81 "src/font_manager.cpp", 82 "src/font_manager.h", 83 "src/plugin/plugin.cpp", 84 "version.cpp", 85 ] 86 87 deps = [ 88 "${LUME_CORE3D_PATH}/DLL:libPluginAGP3D", 89 "${LUME_CORE_PATH}/DLL:libAGPDLL", 90 "${LUME_RENDER_PATH}:libPluginAGPRender", 91 ] 92 93 external_deps = [ 94 "c_utils:utils", 95 "freetype:freetype_static", 96 "libpng:libpng", 97 "zlib:libz", 98 ] 99 part_name = "graphic_3d" 100 subsystem_name = "graphic" 101} 102 103ohos_static_library("libFont") { 104 public_deps = [ ":lume_font_src" ] 105 106 part_name = "graphic_3d" 107 subsystem_name = "graphic" 108} 109 110config("lume_font_plugin_config") { 111 defines = [ "CORE_PLUGIN=1" ] 112} 113 114ohos_source_set("lume_font_src_plugin") { 115 sources = [] 116 117 configs = [ 118 ":lume_font_plugin_config", 119 ":lume_font_api", 120 "${LUME_CORE3D_PATH}:lume_3d_api", 121 "${LUME_RENDER_PATH}:lume_render_api", 122 "${LUME_CORE_PATH}:lume_base_api", 123 "${LUME_CORE_PATH}:lume_engine_api", 124 "${LUME_CORE_PATH}:lume_component_help_config", 125 "${LUME_CORE_PATH}:lume_default", 126 ] 127 part_name = "graphic_3d" 128 subsystem_name = "graphic" 129} 130 131ohos_shared_library("libPluginFont") { 132 public_deps = [ 133 ":libFont", 134 ":lume_font_src_plugin", 135 ] 136 137 relative_install_dir = "graphics3d" 138 part_name = "graphic_3d" 139 subsystem_name = "graphic" 140} 141