Skip to content

Commit

Permalink
📝 Add CMake linking steps
Browse files Browse the repository at this point in the history
  • Loading branch information
kammce committed Jul 29, 2024
1 parent c359da2 commit 1fb1029
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ conan create . -pr stm32f103c8 -pr arm-gcc-12.3 --version=latest
## 📋 Adding `libhal-__device__` to your project

Add the following to your `requirements()` method:
Add the following to your `requirements()` method within your application or
library's `conanfile.py`:

```python
def requirements(self):
Expand All @@ -59,6 +60,19 @@ Add the following to your `requirements()` method:

Replace version `1.0.0` with the desired version of the library.

Assuming you are using CMake, you'll need to find and link the package to your
executable:

```cmake
find_package(libhal-__device__ REQUIRED CONFIG)
target_link_libraries(app.elf PRIVATE libhal::__device__)
```

Replace `app.elf` with the name of your executable.

The available headers for your app or library will exist in the
[`include/libhal-__device__/`](./include/libhal-__device__) directory.

## Contributing

See [`CONTRIBUTING.md`](CONTRIBUTING.md) for details.
Expand Down

0 comments on commit 1fb1029

Please sign in to comment.