1# Copyright (c) 2020 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# http://www.apache.org/licenses/LICENSE-2.0 6# Unless required by applicable law or agreed to in writing, software 7# distributed under the License is distributed on an "AS IS" BASIS, 8# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 9# See the License for the specific language governing permissions and 10# limitations under the License. 11if (defined(ohos_lite)) { 12 import("//build/lite/config/component/lite_component.gni") 13} else { 14 import("//build/ohos.gni") 15} 16config("freetype_config") { 17 defines = [ "FT2_BUILD_LIBRARY" ] 18 include_dirs = [ "include" ] 19} 20 21freetype_sources = [ 22 "src\autofit\autofit.c", 23 "src\base\ftbase.c", 24 "src\base\ftbbox.c", 25 "src\base\ftbdf.c", 26 "src\base\ftbitmap.c", 27 "src\base\ftcid.c", 28 "src\base\ftdebug.c", 29 "src\base\ftfstype.c", 30 "src\base\ftgasp.c", 31 "src\base\ftglyph.c", 32 "src\base\ftgxval.c", 33 "src\base\ftinit.c", 34 "src\base\ftmm.c", 35 "src\base\ftotval.c", 36 "src\base\ftpatent.c", 37 "src\base\ftpfr.c", 38 "src\base\ftstroke.c", 39 "src\base\ftsynth.c", 40 "src\base\ftsystem.c", 41 "src\base\fttype1.c", 42 "src\base\ftwinfnt.c", 43 "src\bdf\bdf.c", 44 "src\cache\ftcache.c", 45 "src\cff\cff.c", 46 "src\cid\type1cid.c", 47 "src\gzip\ftgzip.c", 48 "src\lzw\ftlzw.c", 49 "src\pcf\pcf.c", 50 "src\pfr\pfr.c", 51 "src\psaux\psaux.c", 52 "src\pshinter\pshinter.c", 53 "src\psnames\psmodule.c", 54 "src\raster\raster.c", 55 "src\sfnt\sfnt.c", 56 "src\smooth\smooth.c", 57 "src\truetype\truetype.c", 58 "src\type1\type1.c", 59 "src\type42\type42.c", 60 "src\winfonts\winfnt.c", 61] 62 63if (defined(ohos_lite)) { 64 lite_library("freetype") { 65 if (ohos_kernel_type == "liteos_m") { 66 target_type = "static_library" 67 } else { 68 target_type = "shared_library" 69 } 70 sources = freetype_sources 71 include_dirs = [ "src\base" ] 72 public_configs = [ ":freetype_config" ] 73 } 74 75 lite_component("freetype_shared") { 76 features = [ ":freetype" ] 77 } 78} else { 79 ohos_static_library("freetype_static") { 80 sources = freetype_sources 81 include_dirs = [ "src\base" ] 82 public_configs = [ ":freetype_config" ] 83 } 84} 85