-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stb #3469
base: main
Are you sure you want to change the base?
Add stb #3469
Conversation
@bazel-io skip_check unstable_url |
Hello @bazelbuild/bcr-maintainers, modules without existing maintainers (stb) have been updated in this PR. Please review the changes. |
cc_library( | ||
name = "stb_image", | ||
hdrs = ["stb_image.h"], | ||
defines = ["STB_IMAGE_IMPLEMENTATION"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on https://github.com/nothings/stb?tab=readme-ov-file#how-do-i-use-these-libraries, wouldn't all targets need to look like this?
cc_library(
name = "stb_thing",
hdrs = ["stb_thing.h"],
# A generated file that includes the header after defining `STB_THING_IMPLEMENTATION`.
srcs = ["stb_thing.c"],
...
)
This would allow users to use the headers without having to worry about the "include in exactly one source file" bit. You could probably get away with an empty source file if you use local_defines
to set the macro and -include
to force inclusion of the header.
https://github.com/nothings/stb