diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 0000000..6879fb3 --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,17 @@ +# This rule produces lib${name}.so and lib${name}.a +cc_library( + name = "spng", + srcs = ["spng/spng.c"], + hdrs = ["spng/spng.h"], + includes = ["spng"], + visibility = ["//visibility:public"], + deps = ["@zlib"], +) + +# This alias allows one to simply use "@libspng" as dependency, +# instead of "@libsnpg//:spng". +alias( + name = "libspng", + actual = ":spng", + visibility = ["//visibility:public"], +) diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..d468c3c --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,11 @@ +""" +PNG decoding and encoding library +""" + +module( + name = "libspng", + version = "0.7.4", + compatibility_level = 1, +) + +bazel_dep(name = "zlib", version = "1.3.1")