Skip to content

Commit

Permalink
Use cargo-c in the C-API example
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero committed Sep 2, 2024
1 parent 898ca25 commit 5853767
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/c-api/examples/cairo/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TARGET = example
LIBS = -lm -L../../../../target/debug -lresvg `pkg-config --libs cairo`
LIBS = `pkg-config --libs cairo resvg`
CC = gcc
CFLAGS = -g -Wall `pkg-config --cflags cairo` -I../../
CFLAGS = -g -Wall `pkg-config --cflags cairo resvg`

.PHONY: default all clean

Expand Down
5 changes: 3 additions & 2 deletions crates/c-api/examples/cairo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ A simple example that shows how to use *resvg* through C API to render on a Cair
## Run

```bash
cargo build --manifest-path ../../Cargo.toml
eval `cargo cbuild -v --library-type staticlib 2>&1 | grep PKG_CONFIG_PATH | cut -d ' ' -f 2`
export PKG_CONFIG_PATH
make
LD_LIBRARY_PATH=../../../../target/debug ./example image.svg image.png
./example image.svg image.png
```

0 comments on commit 5853767

Please sign in to comment.