1# Copyright 2018 Google Inc. 2# 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6import("../../gn/skia.gni") 7import("skshaper.gni") 8 9if (skia_enable_skshaper) { 10 config("public_config") { 11 include_dirs = [ "include" ] 12 defines = [] 13 if (is_component_build) { 14 defines += [ "SKSHAPER_DLL" ] 15 } 16 if (skia_use_fonthost_mac) { 17 defines += [ "SK_SHAPER_CORETEXT_AVAILABLE" ] 18 } 19 if (skia_use_harfbuzz && skia_enable_skunicode) { 20 defines += [ "SK_SHAPER_HARFBUZZ_AVAILABLE" ] 21 } 22 } 23 24 component("skshaper") { 25 check_includes = false 26 public_configs = [ ":public_config" ] 27 public = skia_shaper_public 28 if (!use_oh_skia) { 29 deps = [ "../..:skia" ] 30 } else { 31 include_dirs = [ "//third_party/skia" ] 32 deps = [] 33 } 34 defines = [ "SKSHAPER_IMPLEMENTATION=1" ] 35 if (use_oh_skia) { 36 defines += [ "SK_UNICODE_AVAILABLE" ] 37 } 38 sources = skia_shaper_primitive_sources 39 if (skia_use_fonthost_mac) { 40 sources += skia_shaper_coretext_sources 41 if (is_mac) { 42 frameworks = [ "ApplicationServices.framework" ] 43 } 44 45 if (is_ios) { 46 frameworks = [ 47 "CoreFoundation.framework", 48 "CoreText.framework", 49 ] 50 } 51 } 52 if (skia_use_harfbuzz && skia_enable_skunicode) { 53 sources += skia_shaper_harfbuzz_sources 54 deps += [ 55 "${skia_third_party_dir}/harfbuzz", 56 "../skunicode", 57 ] 58 if (use_oh_skia) { 59 deps -= [ "../skunicode" ] 60 } 61 } 62 configs += [ 63 "../../:skia_private", 64 "../../third_party/icu/config:no_cxx", 65 ] 66 } 67} else { 68 group("skshaper") { 69 } 70} 71