Skip to content

Commit 6fea658

Browse files
committed
Update information in README about building with/without libpng
1 parent d2df9c8 commit 6fea658

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ You will need:
4444

4545
- A compiler that can compile ISO C99 or C11 code
4646
- [Cmake](https://cmake.org/) - v3.0 or newer
47+
48+
*If you also want to be able to produce images in PNG format with the library, you will need:*
4749
- [libpng](http://www.libpng.org/pub/png/libpng.html) - (this often comes preinstalled with many modern unix-like systems)
4850

4951
> ### Note:
@@ -75,6 +77,20 @@ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DSAXBOSPIRAL_C_STANDARD
7577
LIBSAXBOSPIRAL_C_STANDARD=11 cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
7678
```
7779

80+
Also, by default the CMake build script will look for libpng. If it cannot find it then it will disable support for PNG output.
81+
82+
You may choose to explicitly disable or enable PNG support with the `SAXBOSPIRAL_PNG_SUPPORT` CMake variable, which can be passed on the command-line like so:
83+
84+
```sh
85+
# PNG support is required, build will fail if libpng can't be found
86+
cmake -DSAXBOSPIRAL_PNG_SUPPORT=ON .
87+
```
88+
89+
```sh
90+
# PNG support is not included, even if libpng can be found
91+
cmake -DSAXBOSPIRAL_PNG_SUPPORT=OFF .
92+
```
93+
7894
> ### Note:
7995
8096
> Building as a shared library is recommended as then binaries compiled from [sxbp](https://github.com/saxbophone/sxbp) or your own programs that are linked against the shared version can immediately use any installed upgraded versions of libsaxbospiral with compatible ABIs without needing re-compiling.

0 commit comments

Comments
 (0)