Adding libraries
System libraries
If you want to link a system-wide installed library (such as one you installed through your system's package manager),
use the kind = "system" property.
Here's an example of linking raylib:
[brick]
name = "<project_name>"
kind = "binary"
lang = "c"
edition = "c99"
[libs.raylib]
kind = "system"
Through git
If you want to download a specific version of a library from a git repository:
[libs.<brickname>]
kind = "git"
repo = "<repo_uri>"
version = "v2"
Note: the
<brickname>should be exactly the same as the one in the repo'sbrick.toml.
Other note: The
versionmust be a commit id such as801e950or a tag name such asv2
This will clone the full repository under ~/.bricks/libs/<repo_uri>/full, checkout to that commit,
and then copy the library into <repo_uri>/<version>.
If this library already has a brick.toml, you're done.
If it doesn't, you need to add overrides to your config.
you might need to run
bricks buildbefore you see headers working in your editor.