# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/arkui/ace_engine/ace_config.gni") import("//third_party/flutter/flutter_config.gni") config("ace_libfreetype2_config") { visibility = [ ":*" ] include_dirs = [ "$flutter_root/skia/third_party/freetype2", "$flutter_root/skia/third_party/externals/freetype/include", "$flutter_root/skia/third_party/libpng", "$flutter_root/skia/third_party/externals/libpng", ] cflags = [ "-w", "-fstrict-aliasing", "-fdata-sections", "-ffunction-sections", "-gline-tables-only", "-funwind-tables", "-Wno-unused-parameter", "-fvisibility=hidden", ] } ohos_source_set("ace_libfreetype2") { part_name = flutter_part subsystem_name = flutter_subsystem license_file = "$flutter_root/skia/third_party/externals/freetype/docs/LICENSE.TXT" configs = [ ":ace_libfreetype2_config" ] sources = [ "$flutter_root/skia/third_party/externals/freetype/src/autofit/autofit.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftbase.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftbbox.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftbitmap.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftdebug.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftfstype.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftgasp.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftglyph.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftinit.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftmm.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftpatent.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftstroke.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftsynth.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftsystem.c", "$flutter_root/skia/third_party/externals/freetype/src/base/fttype1.c", "$flutter_root/skia/third_party/externals/freetype/src/base/ftwinfnt.c", "$flutter_root/skia/third_party/externals/freetype/src/cff/cff.c", "$flutter_root/skia/third_party/externals/freetype/src/cid/type1cid.c", "$flutter_root/skia/third_party/externals/freetype/src/gzip/ftgzip.c", "$flutter_root/skia/third_party/externals/freetype/src/psaux/psaux.c", "$flutter_root/skia/third_party/externals/freetype/src/pshinter/pshinter.c", "$flutter_root/skia/third_party/externals/freetype/src/psnames/psnames.c", "$flutter_root/skia/third_party/externals/freetype/src/raster/raster.c", "$flutter_root/skia/third_party/externals/freetype/src/sfnt/sfnt.c", "$flutter_root/skia/third_party/externals/freetype/src/smooth/smooth.c", "$flutter_root/skia/third_party/externals/freetype/src/truetype/truetype.c", "$flutter_root/skia/third_party/externals/freetype/src/type1/type1.c", ] defines = [ "FT2_BUILD_LIBRARY", "FT_CONFIG_MODULES_H=", "FT_CONFIG_OPTIONS_H=", "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) << 24) | ((FREETYPE_MINOR) << 16) | ((FREETYPE_PATCH) << 8))", ] }