Skip to content

Commit

Permalink
Add support for Conan Package Manager
Browse files Browse the repository at this point in the history
This enables us to use conan to download both CMake and libyaml when
building simpleconfig.
  • Loading branch information
thus committed Nov 30, 2023
1 parent d599bc5 commit 0c7ca46
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
*.swp
CMakeUserPresets.json
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ libyaml is needed to build simpleconfig.

## Build

Simpleconfig is built like most other cmake projects:
### Build using vanilla CMake

Simpleconfig can be built like most other cmake projects:

```
mkdir build && cd build
Expand All @@ -32,6 +34,21 @@ make
make install
```

### Build using Conan Package Manager

It's also possible to build simpleconfig using Conan:

```
conan profile detect
conan install . --output-folder build --build=missing
cd build
source conanbuild.sh
cmake --preset conan-release ..
make
make install
source deactivate_conanbuild.sh
```

## Example

See `examples/minimal.c` for an example showing off the basics of simpleconfig.
Expand Down
9 changes: 9 additions & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[requires]
libyaml/0.2.5

[tool_requires]
cmake/3.25.3

[generators]
CMakeDeps
CMakeToolchain

0 comments on commit 0c7ca46

Please sign in to comment.