From 852a8cb1f0f94efa9929e0839e7e3f5b18a337b4 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 15 May 2018 10:46:58 -0400 Subject: switch skia to use skcms.gni On the road to removing skcms/BUILD.gn, and making configuring skcms a little less inside-out. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Change-Id: I3c37c019bbc32a6112d329429f906b3d8b7f0d19 Reviewed-on: https://skia-review.googlesource.com/128304 Commit-Queue: Mike Klein Reviewed-by: Mike Klein --- BUILD.gn | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'BUILD.gn') diff --git a/BUILD.gn b/BUILD.gn index 83146bbc58..d59cea6dda 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -775,12 +775,33 @@ optional("raw") { ] } +import("third_party/skcms/skcms.gni") +config("third_party_skcms_public") { + include_dirs = [ "third_party/skcms" ] +} +source_set("third_party_skcms") { + public_configs = [ ":third_party_skcms_public" ] + + cflags = [] + if (!is_win || is_clang) { + cflags += [ + "-w", + "-std=c11", + ] + } + + public = [ + "third_party/skcms/skcms.h", + ] + sources = rebase_path(skcms_sources, ".", "third_party/skcms") +} + optional("skcms") { enabled = skia_use_skcms public_defines = [ "SK_USE_SKCMS" ] deps = [ - "third_party/skcms", + ":third_party_skcms", ] sources = [ "src/core/SkColorSpaceXform_skcms.cpp", @@ -1421,9 +1442,9 @@ if (skia_enable_tools) { ":experimental_svg_model", ":flags", ":skia", + ":third_party_skcms", ":tool_utils", "//third_party/libpng", - "//third_party/skcms", "//third_party/zlib", ] public_deps = [ -- cgit v1.2.3