Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 1 | # Copyright 2023 The Dawn & Tint Authors |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 2 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 3 | # Redistribution and use in source and binary forms, with or without |
| 4 | # modification, are permitted provided that the following conditions are met: |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 5 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 6 | # 1. Redistributions of source code must retain the above copyright notice, this |
| 7 | # list of conditions and the following disclaimer. |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 8 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 9 | # 2. Redistributions in binary form must reproduce the above copyright notice, |
| 10 | # this list of conditions and the following disclaimer in the documentation |
| 11 | # and/or other materials provided with the distribution. |
| 12 | # |
| 13 | # 3. Neither the name of the copyright holder nor the names of its |
| 14 | # contributors may be used to endorse or promote products derived from |
| 15 | # this software without specific prior written permission. |
| 16 | # |
| 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 20 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 21 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 22 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 23 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 24 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 25 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 27 | |
| 28 | ################################################################################ |
| 29 | # File generated by 'tools/src/cmd/gen' using the template: |
| 30 | # tools/src/cmd/gen/build/BUILD.bazel.tmpl |
| 31 | # |
| 32 | # To regenerate run: './tools/run gen' |
| 33 | # |
| 34 | # Do not modify this file directly |
| 35 | ################################################################################ |
| 36 | |
| 37 | load("//src/tint:flags.bzl", "COPTS") |
| 38 | load("@bazel_skylib//lib:selects.bzl", "selects") |
| 39 | cc_library( |
| 40 | name = "text", |
| 41 | srcs = [ |
Ben Clayton | c97af90 | 2023-11-23 08:08:53 +0000 | [diff] [blame] | 42 | "base64.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 43 | "string.cc", |
| 44 | "string_stream.cc", |
Ben Clayton | 89549b1 | 2024-02-26 20:24:06 +0000 | [diff] [blame] | 45 | "styled_text.cc", |
| 46 | "styled_text_printer.cc", |
| 47 | "styled_text_printer_ansi.cc", |
| 48 | "styled_text_theme.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 49 | "unicode.cc", |
Ben Clayton | 89549b1 | 2024-02-26 20:24:06 +0000 | [diff] [blame] | 50 | ] + select({ |
| 51 | ":_not_tint_build_is_linux__and__not_tint_build_is_mac__and__not_tint_build_is_win_": [ |
| 52 | "styled_text_printer_other.cc", |
| 53 | ], |
| 54 | "//conditions:default": [], |
| 55 | }) + select({ |
| 56 | ":tint_build_is_linux_or_tint_build_is_mac": [ |
| 57 | "styled_text_printer_posix.cc", |
| 58 | ], |
| 59 | "//conditions:default": [], |
| 60 | }) + select({ |
| 61 | ":tint_build_is_win": [ |
| 62 | "styled_text_printer_windows.cc", |
| 63 | ], |
| 64 | "//conditions:default": [], |
| 65 | }), |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 66 | hdrs = [ |
Ben Clayton | f0973d5 | 2023-11-23 08:08:53 +0000 | [diff] [blame] | 67 | "base64.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 68 | "string.h", |
| 69 | "string_stream.h", |
Ben Clayton | 89549b1 | 2024-02-26 20:24:06 +0000 | [diff] [blame] | 70 | "styled_text.h", |
| 71 | "styled_text_printer.h", |
| 72 | "styled_text_theme.h", |
| 73 | "text_style.h", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 74 | "unicode.h", |
| 75 | ], |
| 76 | deps = [ |
| 77 | "//src/tint/utils/containers", |
| 78 | "//src/tint/utils/ice", |
| 79 | "//src/tint/utils/macros", |
| 80 | "//src/tint/utils/math", |
| 81 | "//src/tint/utils/memory", |
| 82 | "//src/tint/utils/rtti", |
Ben Clayton | 6b4c1cb | 2024-02-29 19:58:42 +0000 | [diff] [blame] | 83 | "//src/tint/utils/system", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 84 | "//src/tint/utils/traits", |
| 85 | ], |
| 86 | copts = COPTS, |
| 87 | visibility = ["//visibility:public"], |
| 88 | ) |
| 89 | cc_library( |
| 90 | name = "test", |
| 91 | alwayslink = True, |
| 92 | srcs = [ |
Ben Clayton | f0973d5 | 2023-11-23 08:08:53 +0000 | [diff] [blame] | 93 | "base64_test.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 94 | "string_stream_test.cc", |
| 95 | "string_test.cc", |
Ben Clayton | 89549b1 | 2024-02-26 20:24:06 +0000 | [diff] [blame] | 96 | "styled_text_printer_test.cc", |
| 97 | "text_style_test.cc", |
Ben Clayton | 6562555 | 2023-09-11 18:33:43 +0000 | [diff] [blame] | 98 | "unicode_test.cc", |
| 99 | ], |
| 100 | deps = [ |
| 101 | "//src/tint/utils/containers", |
| 102 | "//src/tint/utils/ice", |
| 103 | "//src/tint/utils/macros", |
| 104 | "//src/tint/utils/math", |
| 105 | "//src/tint/utils/memory", |
| 106 | "//src/tint/utils/rtti", |
| 107 | "//src/tint/utils/text", |
| 108 | "//src/tint/utils/traits", |
| 109 | "@gtest", |
| 110 | ], |
| 111 | copts = COPTS, |
| 112 | visibility = ["//visibility:public"], |
| 113 | ) |
| 114 | |
Ben Clayton | 89549b1 | 2024-02-26 20:24:06 +0000 | [diff] [blame] | 115 | alias( |
| 116 | name = "tint_build_is_linux", |
| 117 | actual = "//src/tint:tint_build_is_linux_true", |
| 118 | ) |
| 119 | |
| 120 | alias( |
| 121 | name = "_not_tint_build_is_linux_", |
| 122 | actual = "//src/tint:tint_build_is_linux_false", |
| 123 | ) |
| 124 | |
| 125 | alias( |
| 126 | name = "tint_build_is_mac", |
| 127 | actual = "//src/tint:tint_build_is_mac_true", |
| 128 | ) |
| 129 | |
| 130 | alias( |
| 131 | name = "_not_tint_build_is_mac_", |
| 132 | actual = "//src/tint:tint_build_is_mac_false", |
| 133 | ) |
| 134 | |
| 135 | alias( |
| 136 | name = "tint_build_is_win", |
| 137 | actual = "//src/tint:tint_build_is_win_true", |
| 138 | ) |
| 139 | |
| 140 | alias( |
| 141 | name = "_not_tint_build_is_win_", |
| 142 | actual = "//src/tint:tint_build_is_win_false", |
| 143 | ) |
| 144 | |
| 145 | selects.config_setting_group( |
| 146 | name = "tint_build_is_linux_or_tint_build_is_mac", |
| 147 | match_any = [ |
| 148 | "tint_build_is_linux", |
| 149 | "tint_build_is_mac", |
| 150 | ], |
| 151 | ) |
| 152 | |
| 153 | selects.config_setting_group( |
| 154 | name = "_not_tint_build_is_linux__and__not_tint_build_is_mac__and__not_tint_build_is_win_", |
| 155 | match_all = [ |
| 156 | ":_not_tint_build_is_linux_", |
| 157 | ":_not_tint_build_is_mac_", |
| 158 | ":_not_tint_build_is_win_", |
| 159 | ], |
| 160 | ) |
| 161 | |