cPNG/README.md

28 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

# Library cPNG 1.5.30 repository for CASIO fx-CG 10/20 (a.k.a. PRIZM) and fx-CG 50 (or Graph 90+E)
2022-05-03 23:24:25 +02:00
Need to have a fully working gcc toolchain for SH3/SH4 architecture.
2022-05-03 23:24:25 +02:00
**Note:** libcPNG requires cZlib available, so the very first step is to get that library available and working prior to libcPNG.
You can get a working Zlib for CASIO fx-CG 10/20 (a.k.a. PRIZM) and fx-CG 50 (or Graph 90+E) here : [libcZlib for PRIZM](https://gitea.planet-casio.com/Slyvtt/cZlib)
2022-05-03 23:24:25 +02:00
You can use the `giteapc install Slyvtt/cPNG` command to get an automatic install
2022-05-03 23:24:25 +02:00
## Using in a program
2022-05-03 23:24:25 +02:00
With CMake
2022-05-03 23:24:25 +02:00
```cmake
find_package(cPNG 1.5.30 REQUIRED)
target_link_libraries(<TARGET> PRIVATE cPNG::cPNG)
```
2022-05-03 23:24:25 +02:00
2022-05-05 21:42:57 +02:00
With make, the following steps are not automatically done, so please proceed with the following manipulations :
2022-05-05 21:42:57 +02:00
* copy the library `libcPNG.a` into your SH3/SH4 compiler lib folder
* copy `png.h`, `pngconf.h` and `pnglibconf.h` files contained in the include folder into the include folder of the SH3/SH4 compiler
* link with `-lcPNG -lcZlib`
In the C/C++ sources `#include <png.h>`