代码拉取完成,页面将自动刷新
# Copyright (c) 2020 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.
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
} else {
import("//build/ohos.gni")
}
config("freetype_config") {
defines = [ "FT2_BUILD_LIBRARY" ]
include_dirs = [ "${target_gen_dir}/freetype/include" ]
}
action("freetype_action") {
script = "//third_party/freetype/install.py"
outputs = [
"${target_gen_dir}/freetype/src/autofit/autofit.c",
"${target_gen_dir}/freetype/src/base/ftbase.c",
"${target_gen_dir}/freetype/src/base/ftbbox.c",
"${target_gen_dir}/freetype/src/base/ftbdf.c",
"${target_gen_dir}/freetype/src/base/ftbitmap.c",
"${target_gen_dir}/freetype/src/base/ftcid.c",
"${target_gen_dir}/freetype/src/base/ftdebug.c",
"${target_gen_dir}/freetype/src/base/ftfstype.c",
"${target_gen_dir}/freetype/src/base/ftgasp.c",
"${target_gen_dir}/freetype/src/base/ftglyph.c",
"${target_gen_dir}/freetype/src/base/ftgxval.c",
"${target_gen_dir}/freetype/src/base/ftinit.c",
"${target_gen_dir}/freetype/src/base/ftmm.c",
"${target_gen_dir}/freetype/src/base/ftotval.c",
"${target_gen_dir}/freetype/src/base/ftpatent.c",
"${target_gen_dir}/freetype/src/base/ftpfr.c",
"${target_gen_dir}/freetype/src/base/ftstroke.c",
"${target_gen_dir}/freetype/src/base/ftsynth.c",
"${target_gen_dir}/freetype/src/base/ftsystem.c",
"${target_gen_dir}/freetype/src/base/fttype1.c",
"${target_gen_dir}/freetype/src/base/ftwinfnt.c",
"${target_gen_dir}/freetype/src/bdf/bdf.c",
"${target_gen_dir}/freetype/src/cache/ftcache.c",
"${target_gen_dir}/freetype/src/cff/cff.c",
"${target_gen_dir}/freetype/src/cid/type1cid.c",
"${target_gen_dir}/freetype/src/gzip/ftgzip.c",
"${target_gen_dir}/freetype/src/lzw/ftlzw.c",
"${target_gen_dir}/freetype/src/pcf/pcf.c",
"${target_gen_dir}/freetype/src/pfr/pfr.c",
"${target_gen_dir}/freetype/src/psaux/psaux.c",
"${target_gen_dir}/freetype/src/pshinter/pshinter.c",
"${target_gen_dir}/freetype/src/psnames/psmodule.c",
"${target_gen_dir}/freetype/src/raster/raster.c",
"${target_gen_dir}/freetype/src/sdf/ftbsdf.c",
"${target_gen_dir}/freetype/src/sdf/ftsdf.c",
"${target_gen_dir}/freetype/src/sdf/ftsdfcommon.c",
"${target_gen_dir}/freetype/src/sdf/ftsdfrend.c",
"${target_gen_dir}/freetype/src/sfnt/sfnt.c",
"${target_gen_dir}/freetype/src/smooth/smooth.c",
"${target_gen_dir}/freetype/src/svg/ftsvg.c",
"${target_gen_dir}/freetype/src/truetype/truetype.c",
"${target_gen_dir}/freetype/src/type1/type1.c",
"${target_gen_dir}/freetype/src/type42/type42.c",
"${target_gen_dir}/freetype/src/winfonts/winfnt.c",
]
inputs = [ "//third_party/freetype/freetype-2.12.1.tar.xz" ]
freetype_path = rebase_path("${target_gen_dir}", root_build_dir)
freetype_source_path = rebase_path("//third_party/freetype", root_build_dir)
args = [
"--gen-dir",
"$freetype_path",
"--source-dir",
"$freetype_source_path",
]
}
if (defined(ohos_lite)) {
lite_library("freetype") {
if (ohos_kernel_type == "liteos_m") {
target_type = "static_library"
} else {
target_type = "shared_library"
}
freetype_sources = get_target_outputs(":freetype_action")
deps = [ "//third_party/libpng:libpng" ]
sources = freetype_sources
include_dirs = [
"${target_gen_dir}/freetype/src/base",
"//third_party/libpng",
]
public_configs = [ ":freetype_config" ]
defines = [ "FT_CONFIG_OPTION_USE_PNG" ]
if (target_type == "static_library") {
deps += [ "//build/lite/config/component/zlib:zlib_static" ]
defines += [ "FT_CONFIG_OPTION_SYSTEM_ZLIB" ]
}
deps += [ ":freetype_action" ]
if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") {
cflags = [
"--diag_suppress",
"Pa082,Pa084,Pa128,Pe128,Pa134,Pa137,Pe550",
]
cflags_cc = cflags
}
}
lite_component("freetype_shared") {
features = [ ":freetype" ]
}
} else {
ohos_static_library("freetype_static") {
sources = get_target_outputs(":freetype_action")
include_dirs = [ "${target_gen_dir}/freetype/src/base" ]
public_configs = [ ":freetype_config" ]
deps = [ ":freetype_action" ]
external_deps = [ "zlib:libz" ]
defines = [ "FT_CONFIG_OPTION_SYSTEM_ZLIB" ]
if (current_os == "ohos") {
external_deps += [ "libpng:libpng" ]
defines += [ "FT_CONFIG_OPTION_USE_PNG" ]
}
part_name = "freetype"
subsystem_name = "thirdparty"
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。