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_icu && skia_use_harfbuzz) { 20 defines += [ "SK_SHAPER_HARFBUZZ_AVAILABLE" ] 21 defines += [ "SK_UNICODE_AVAILABLE" ] 22 } 23 } 24 25 component("skshaper") { 26 check_includes = false 27 public_configs = [ ":public_config" ] 28 public = skia_shaper_public 29 deps = [ "../..:skia" ] 30 defines = [ 31 "SKSHAPER_IMPLEMENTATION=1", 32 "SKUNICODE_IMPLEMENTATION=1", 33 ] 34 sources = skia_shaper_primitive_sources 35 if (skia_use_fonthost_mac) { 36 sources += skia_shaper_coretext_sources 37 if (is_mac) { 38 frameworks = [ "ApplicationServices.framework" ] 39 } 40 41 if (is_ios) { 42 frameworks = [ 43 "CoreFoundation.framework", 44 "CoreText.framework", 45 ] 46 } 47 } 48 if (skia_use_icu && skia_use_harfbuzz) { 49 sources += skia_shaper_icu_sources 50 sources += skia_shaper_harfbuzz_sources 51 deps += [ 52 "//third_party/harfbuzz", 53 "//third_party/icu", 54 ] 55 } 56 configs += [ 57 "../../:skia_private", 58 "../../third_party/icu/config:no_cxx", 59 ] 60 } 61} else { 62 group("skshaper") { 63 } 64} 65