Skip to content

Commit f30eaf9

Browse files
committed
Mention libpng's dependency in README
Closes #134
1 parent 456763d commit f30eaf9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,23 @@ It is sometimes difficult to understand the cause of a doppelganger failure. A f
5454
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.
5555

5656
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.
57+
58+
59+
## Building vdiffr
60+
61+
_This section is only relevant for building vdiffr from scratch, as opposed to installing from a pre-built package on CRAN._
62+
63+
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.
64+
65+
For instance on macOS, install libpng with:
66+
67+
```sh
68+
brew install libpng
69+
```
70+
71+
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:
72+
73+
```mk
74+
CPPFLAGS += -I/opt/homebrew/include
75+
LDFLAGS += -L/opt/homebrew/lib
76+
```

0 commit comments

Comments
 (0)