| load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") |
| |
| # This first example only needs the core Skia functionality and the pathops |
| # module. Thus, the client defines a cc_library (skia_core_and_pathops) with |
| # those components and then depending on that library. |
| cc_binary( |
| name = "path_combiner", |
| srcs = ["src/path_main.cpp"], |
| copts = ["-std=c++17"], |
| linkopts = [ |
| "-fuse-ld=lld", |
| "-lpthread", |
| ], |
| deps = [":skia_core_and_pathops"], |
| ) |
| |
| cc_library( |
| name = "skia_core_and_pathops", |
| deps = [ |
| "@skia//:core", |
| "@skia//:pathops", |
| ], |
| ) |
| |
| cc_binary( |
| name = "png_decoder", |
| srcs = ["src/decode_png_main.cpp"], |
| copts = ["-std=c++17"], |
| linkopts = [ |
| "-fuse-ld=lld", |
| "-lpthread", |
| ], |
| deps = [ |
| "@skia//:core", |
| "@skia//:png_decode_codec", |
| ], |
| ) |