forked from tensorflow/tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpng.BUILD
70 lines (65 loc) · 1.55 KB
/
png.BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Description:
# libpng is the official PNG reference library.
licenses(["notice"]) # BSD/MIT-like license
exports_files(["LICENSE"])
cc_library(
name = "png",
srcs = [
"png.c",
"pngdebug.h",
"pngerror.c",
"pngget.c",
"pnginfo.h",
"pnglibconf.h",
"pngmem.c",
"pngpread.c",
"pngpriv.h",
"pngread.c",
"pngrio.c",
"pngrtran.c",
"pngrutil.c",
"pngset.c",
"pngstruct.h",
"pngtrans.c",
"pngwio.c",
"pngwrite.c",
"pngwtran.c",
"pngwutil.c",
] + select({
":windows": [
"intel/intel_init.c",
"intel/filter_sse2_intrinsics.c",
],
"@org_tensorflow//tensorflow:linux_ppc64le": [
"powerpc/powerpc_init.c",
"powerpc/filter_vsx_intrinsics.c",
],
"//conditions:default": [
],
}),
hdrs = [
"png.h",
"pngconf.h",
],
copts = select({
":windows": ["-DPNG_INTEL_SSE_OPT=1"],
"//conditions:default": [],
}),
includes = ["."],
linkopts = select({
":windows": [],
"//conditions:default": ["-lm"],
}),
visibility = ["//visibility:public"],
deps = ["@zlib_archive//:zlib"],
)
genrule(
name = "snappy_stubs_public_h",
srcs = ["scripts/pnglibconf.h.prebuilt"],
outs = ["pnglibconf.h"],
cmd = "sed -e 's/PNG_ZLIB_VERNUM 0/PNG_ZLIB_VERNUM 0x12b0/' $< >$@",
)
config_setting(
name = "windows",
values = {"cpu": "x64_windows"},
)