Skip to content

Commit

Permalink
Mention libpng's dependency in README
Browse files Browse the repository at this point in the history
Closes #134
  • Loading branch information
lionel- committed Oct 22, 2024
1 parent 456763d commit f30eaf9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,23 @@ It is sometimes difficult to understand the cause of a doppelganger failure. A f
To help you understand the causes of a failure, vdiffr automatically logs the SVG diff of all failures when run under R CMD check. The log is located in `tests/vdiffr.Rout.fail` and should be displayed on Travis.

You can also set the `VDIFFR_LOG_PATH` environment variable with `Sys.setenv()` to unconditionally (also interactively) log failures in the file pointed by the variable.


## Building vdiffr

_This section is only relevant for building vdiffr from scratch, as opposed to installing from a pre-built package on CRAN._

Building vdiffr requires the system dependency libpng. As vdiffr doesn't have any build-time configuration, your R configuration must point to libpng's `include` and `lib` folders.

For instance on macOS, install libpng with:

```sh
brew install libpng
```

And make sure your `~/.R/Makevars` knows about Homebrew's `include` and `lib` folders where libpng should now be installed. On arm64 hardware, this would be:

```mk
CPPFLAGS += -I/opt/homebrew/include
LDFLAGS += -L/opt/homebrew/lib
```

0 comments on commit f30eaf9

Please sign in to comment.