FindPNG: Add versioned library names for 1.6 (#14289)
While at it, refactor the versioned library name list generation to reduce duplication.
This commit is contained in:
parent
b94e726a83
commit
96fa4a2e43
|
@ -38,7 +38,10 @@ if(ZLIB_FOUND)
|
||||||
/usr/local/include/libpng # OpenBSD
|
/usr/local/include/libpng # OpenBSD
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PNG_NAMES ${PNG_NAMES} png libpng png15 libpng15 png15d libpng15d png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d)
|
list(APPEND PNG_NAMES png libpng)
|
||||||
|
foreach(v 16 15 14 12)
|
||||||
|
list(APPEND PNG_NAMES png${v} libpng${v} png${v}d libpng${v}d)
|
||||||
|
endforeach()
|
||||||
find_library(PNG_LIBRARY NAMES ${PNG_NAMES} )
|
find_library(PNG_LIBRARY NAMES ${PNG_NAMES} )
|
||||||
|
|
||||||
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
|
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
|
||||||
|
|
Loading…
Reference in New Issue