diff options
author | Brad King <brad.king@kitware.com> | 2013-07-15 13:51:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-07-15 13:52:53 (GMT) |
commit | 96fa4a2e43024eb81b9f37ba33432c14db4264c0 (patch) | |
tree | e0d933dffca6b92e4c6860f2f6230db898712a31 /Modules/FindPNG.cmake | |
parent | b94e726a83b92f5b7376b97aa448107884a76685 (diff) | |
download | CMake-96fa4a2e43024eb81b9f37ba33432c14db4264c0.zip CMake-96fa4a2e43024eb81b9f37ba33432c14db4264c0.tar.gz CMake-96fa4a2e43024eb81b9f37ba33432c14db4264c0.tar.bz2 |
FindPNG: Add versioned library names for 1.6 (#14289)
While at it, refactor the versioned library name list generation to
reduce duplication.
Diffstat (limited to 'Modules/FindPNG.cmake')
-rw-r--r-- | Modules/FindPNG.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake index d96d2cc..fef4669 100644 --- a/Modules/FindPNG.cmake +++ b/Modules/FindPNG.cmake @@ -38,7 +38,10 @@ if(ZLIB_FOUND) /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} ) if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) |