1# https://github.com/bazelbuild/bazel-skylib 2load("@bazel_skylib//lib:selects.bzl", "selects") 3load("//bazel:macros.bzl", "select_multi") 4 5package(default_visibility = ["//visibility:private"]) 6 7filegroup( 8 name = "androidcodec-srcs", 9 srcs = [ 10 "SkAndroidCodec.cpp", 11 "SkAndroidCodecAdapter.cpp", 12 "SkAndroidCodecAdapter.h", 13 "SkSampledCodec.cpp", 14 "SkSampledCodec.h", 15 ], 16) 17 18filegroup( 19 name = "bmp-srcs", 20 srcs = [ 21 "SkBmpBaseCodec.cpp", 22 "SkBmpBaseCodec.h", 23 "SkBmpCodec.cpp", 24 "SkBmpCodec.h", 25 "SkBmpMaskCodec.cpp", 26 "SkBmpMaskCodec.h", 27 "SkBmpRLECodec.cpp", 28 "SkBmpRLECodec.h", 29 "SkBmpStandardCodec.cpp", 30 "SkBmpStandardCodec.h", 31 "SkWbmpCodec.cpp", 32 "SkWbmpCodec.h", 33 ], 34) 35 36filegroup( 37 name = "core-srcs", 38 srcs = [ 39 "SkCodec.cpp", 40 "SkCodecImageGenerator.cpp", 41 "SkCodecImageGenerator.h", 42 "SkCodecPriv.h", 43 "SkColorTable.cpp", 44 "SkColorTable.h", 45 "SkFrameHolder.h", 46 "SkMaskSwizzler.cpp", 47 "SkMaskSwizzler.h", 48 "SkMasks.cpp", 49 "SkMasks.h", 50 "SkSampler.cpp", 51 "SkSampler.h", 52 "SkSwizzler.cpp", 53 "SkSwizzler.h", 54 ], 55) 56 57filegroup( 58 name = "gif-srcs", 59 srcs = [ 60 "SkScalingCodec.h", 61 "SkWuffsCodec.cpp", 62 "SkWuffsCodec.h", 63 ], 64) 65 66filegroup( 67 name = "jpeg-srcs", 68 srcs = [ 69 "SkEncodedInfo.cpp", 70 "SkJpegCodec.cpp", 71 "SkJpegCodec.h", 72 "SkJpegDecoderMgr.cpp", 73 "SkJpegDecoderMgr.h", 74 "SkJpegPriv.h", 75 "SkJpegUtility.cpp", 76 "SkJpegUtility.h", 77 "SkParseEncodedOrigin.cpp", 78 "SkParseEncodedOrigin.h", 79 ], 80) 81 82filegroup( 83 name = "png-srcs", 84 srcs = [ 85 "SkEncodedInfo.cpp", 86 "SkIcoCodec.cpp", 87 "SkIcoCodec.h", 88 "SkPngCodec.cpp", 89 "SkPngCodec.h", 90 "SkPngPriv.h", 91 ], 92) 93 94filegroup( 95 name = "raw-srcs", 96 srcs = [ 97 "SkRawCodec.cpp", 98 "SkRawCodec.h", 99 ], 100) 101 102filegroup( 103 name = "webp-srcs", 104 srcs = [ 105 "SkEncodedInfo.cpp", 106 "SkParseEncodedOrigin.cpp", 107 "SkParseEncodedOrigin.h", 108 "SkScalingCodec.h", 109 "SkWebpCodec.cpp", 110 "SkWebpCodec.h", 111 ], 112) 113 114filegroup( 115 name = "srcs", 116 srcs = [ 117 ":androidcodec-srcs", 118 ":bmp-srcs", 119 ":core-srcs", 120 ] + select_multi( 121 { 122 "//bazel/common_config_settings:gif_codec": [":gif-srcs"], 123 "//bazel/common_config_settings:png_codec": [":png-srcs"], 124 "//bazel/common_config_settings:raw_codec": [":raw-srcs"], 125 "//bazel/common_config_settings:webp_codec": [":webp-srcs"], 126 }, 127 default = [], 128 ) + selects.with_or({ 129 # The RAW codec depends on JPEG, but we cannot list jpeg twice in the above list, or 130 # Bazel gets sad. 131 ("//bazel/common_config_settings:jpeg_codec", "//bazel/common_config_settings:raw_codec"): [":jpeg-srcs"], 132 "//conditions:default": [], 133 }), 134 visibility = ["//:__subpackages__"], 135) 136