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 <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 83146bb..d59cea6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -775,12 +775,33 @@
]
}
+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 @@
":experimental_svg_model",
":flags",
":skia",
+ ":third_party_skcms",
":tool_utils",
"//third_party/libpng",
- "//third_party/skcms",
"//third_party/zlib",
]
public_deps = [