Skip to content

Commit

Permalink
Add stb (#3469)
Browse files Browse the repository at this point in the history
  • Loading branch information
hofbi authored Jan 9, 2025
1 parent 5c545d7 commit 88f1173
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/stb/0.0.0-20241109-5c20573/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "stb",
version = "0.0.0-20241109-5c20573",
compatibility_level = 0,
)

bazel_dep(name = "rules_cc", version = "0.0.17")
26 changes: 26 additions & 0 deletions modules/stb/0.0.0-20241109-5c20573/overlay/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""
Take a look at https://github.com/nothings/stb?tab=readme-ov-file#how-do-i-use-these-libraries on how to use this library.
"""

load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
name = "stb_image",
hdrs = ["stb_image.h"],
defines = ["STB_IMAGE_IMPLEMENTATION"],
includes = ["."],
visibility = ["//visibility:public"],
)

[
cc_library(
name = header.split(".")[0],
hdrs = [header],
includes = ["."],
visibility = ["//visibility:public"],
)
for header in glob(
["stb_*.h"],
exclude = ["stb_image.h"],
)
]
1 change: 1 addition & 0 deletions modules/stb/0.0.0-20241109-5c20573/overlay/MODULE.bazel
21 changes: 21 additions & 0 deletions modules/stb/0.0.0-20241109-5c20573/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
matrix:
platform:
- debian10
- debian11
- macos
- macos_arm64
- ubuntu2004
- ubuntu2204
- ubuntu2404
- windows
bazel: [7.x, 8.x]
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--process_headers_in_dependencies'
- '--features=parse_headers'
build_targets:
- '@stb//...'
10 changes: 10 additions & 0 deletions modules/stb/0.0.0-20241109-5c20573/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/nothings/stb/archive/5c205738c191bcb0abc65c4febfa9bd25ff35234.tar.gz",
"integrity": "sha256-z+q5+ACWGILW0i3fNullUjszAC9Pk33ggyEwTJunKvM=",
"strip_prefix": "stb-5c205738c191bcb0abc65c4febfa9bd25ff35234",
"patch_strip": 0,
"overlay": {
"BUILD.bazel": "sha256-DvpSNjAjIgF16s4wrGsOIH10mtBhZ0OYNUgvFn4St4Y=",
"MODULE.bazel": "sha256-OVRPBnEBUp917qFg9XnpqBYVfVkWDYRT5BHJgnjkcxI="
}
}
16 changes: 16 additions & 0 deletions modules/stb/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/nothings/stb",
"maintainers": [
{
"github": "hofbi",
"name": "Markus Hofbauer"
}
],
"repository": [
"github:nothings/stb"
],
"versions": [
"0.0.0-20241109-5c20573"
],
"yanked_versions": {}
}

0 comments on commit 88f1173

Please sign in to comment.