commit | d1048e64d75aed3be48861f5b9ba8b097e344813 | [log] [tgz] |
---|---|---|
author | Armando Montanez <amontanez@google.com> | Tue Jun 04 11:54:23 2024 -0700 |
committer | Armando Montanez <amontanez@google.com> | Tue Jun 04 15:33:26 2024 -0700 |
tree | 896b6bc15d5fe3324823d5e36bef761165177646 | |
parent | d477748d8ee6a1dadf629181c1f90ab054234ff0 [diff] |
Initial commit Initial commit for rules_libusb that provides a release version module extension that simplifies an external dependency on libusb. Change-Id: I4f61890b74f975e792a6b159fb8a6c8e953c14a5
A small wrapper Bazel module that builds libusb from sources. Supports Windows, macOS, and Linux.
At this time, rules_libusb only supports bzlmod projects. Legacy WORKSPACE
projects are not explicitly supported.
Add rules_libusb to your MODULE.bazel
file:
bazel_dep(name = "rules_libusb", version="0.1.0-rc1")
Then add @libusb//:libusb
in dynamic_deps
to the tool that uses it:
cc_binary( name = "my_tool", srcs = ["main.cpp"], deps = ["@rules_libusb//:libusb"], dynamic_deps = ["@rules_libusb//:libusb_dynamic"], )
If you have explicit libusb versioning requirements, you may add them to your MODULE.bazel
:
libusb = use_extension("@rules_libusb//:extensions.bzl", "libusb") libusb.source_release(min_version = "1.0.27")
Note: source_release
constraints follow bzlmod behavior of minimal version selection.
To build this repo, run:
bazel build //:libusb