124 lines
3.0 KiB
Python
124 lines
3.0 KiB
Python
load("@skia_user_config//:copts.bzl", "DEFAULT_COPTS")
|
|
load("//bazel:skia_rules.bzl", "skia_cc_library", "skia_filegroup")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
)
|
|
|
|
licenses(["notice"])
|
|
|
|
# A separate group duplicating :skcms.hdrs for
|
|
# export to //modules/skcms/skcms.gni:skcms_public_headers.
|
|
skia_filegroup(
|
|
name = "public_hdrs",
|
|
srcs = ["skcms.h"],
|
|
)
|
|
|
|
# A separate group duplicating :skcms.srcs for
|
|
# export to //modules/skcms/skcms.gni:skcms_sources.
|
|
skia_filegroup(
|
|
name = "srcs",
|
|
srcs = [
|
|
"skcms.cc",
|
|
"src/skcms_Transform.h",
|
|
"src/skcms_TransformBaseline.cc",
|
|
"src/skcms_TransformHsw.cc",
|
|
"src/skcms_TransformSkx.cc",
|
|
"src/skcms_internals.h",
|
|
"src/skcms_public.h",
|
|
],
|
|
)
|
|
|
|
# A separate group duplicating :skcms.textual_hdrs for
|
|
# export to //modules/skcms/skcms.gni:skcms_sources.
|
|
skia_filegroup(
|
|
name = "textual_hdrs",
|
|
srcs = [
|
|
"src/Transform_inl.h",
|
|
],
|
|
)
|
|
|
|
skia_cc_library(
|
|
name = "skcms",
|
|
hdrs = [
|
|
"skcms.h",
|
|
],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
":skcms_TransformBaseline",
|
|
":skcms_TransformHsw",
|
|
":skcms_TransformSkx",
|
|
":skcms_public",
|
|
],
|
|
)
|
|
|
|
skia_cc_library(
|
|
name = "skcms_public",
|
|
srcs = [
|
|
"skcms.cc",
|
|
"src/skcms_internals.h",
|
|
"src/skcms_public.h",
|
|
],
|
|
hdrs = [
|
|
"skcms.h",
|
|
],
|
|
deps = [":skcms_TransformBaseline"] +
|
|
select({
|
|
"@platforms//cpu:x86_64": [
|
|
":skcms_TransformHsw",
|
|
":skcms_TransformSkx",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|
|
|
|
skia_cc_library(
|
|
name = "skcms_TransformBaseline",
|
|
srcs = [
|
|
"src/skcms_Transform.h",
|
|
"src/skcms_TransformBaseline.cc",
|
|
"src/skcms_internals.h",
|
|
"src/skcms_public.h",
|
|
],
|
|
# This header does not compile on its own and is meant to be included from skcms_Transform*.cc
|
|
textual_hdrs = [
|
|
"src/Transform_inl.h",
|
|
],
|
|
)
|
|
|
|
skia_cc_library(
|
|
name = "skcms_TransformHsw",
|
|
srcs = [
|
|
"src/skcms_Transform.h",
|
|
"src/skcms_TransformHsw.cc",
|
|
"src/skcms_internals.h",
|
|
"src/skcms_public.h",
|
|
],
|
|
copts = DEFAULT_COPTS + select({
|
|
"@platforms//cpu:x86_64": ["-march=haswell"],
|
|
"//conditions:default": [],
|
|
}),
|
|
# This header does not compile on its own and is meant to be included from skcms_Transform*.cc
|
|
textual_hdrs = [
|
|
"src/Transform_inl.h",
|
|
],
|
|
)
|
|
|
|
skia_cc_library(
|
|
name = "skcms_TransformSkx",
|
|
srcs = [
|
|
"src/skcms_Transform.h",
|
|
"src/skcms_TransformSkx.cc",
|
|
"src/skcms_internals.h",
|
|
"src/skcms_public.h",
|
|
],
|
|
copts = DEFAULT_COPTS + select({
|
|
"@platforms//cpu:x86_64": ["-march=skylake-avx512"],
|
|
"//conditions:default": [],
|
|
}),
|
|
# This header does not compile on its own and is meant to be included from skcms_Transform*.cc
|
|
textual_hdrs = [
|
|
"src/Transform_inl.h",
|
|
],
|
|
)
|