FindPNG¶
Find libpng, the official reference library for the PNG image format.
Imported targets¶
Added in version 3.5.
This module defines the following IMPORTED target:
PNG::PNGThe libpng library, if found.
Result variables¶
This module will set the following variables in your project:
PNG_INCLUDE_DIRSwhere to find png.h, etc.
PNG_LIBRARIESthe libraries to link against to use PNG.
PNG_DEFINITIONSYou should add_definitions(${PNG_DEFINITIONS}) before compiling code that includes png library files.
PNG_FOUNDIf false, do not try to use PNG.
PNG_VERSION_STRINGthe version of the PNG library found (since CMake 2.8.8)
Obsolete variables¶
The following variables may also be set, for backwards compatibility:
PNG_LIBRARYwhere to find the PNG library.
PNG_INCLUDE_DIRwhere to find the PNG headers (same as PNG_INCLUDE_DIRS)
Since PNG depends on the ZLib compression library, none of the above will be defined unless ZLib can be found.