diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-08-30 17:47:54 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-08-30 17:47:54 (GMT) |
commit | 07558db6a23ef711e58678f53ff95b42f879bc44 (patch) | |
tree | d96b88bee16d15c9e4eea9a10037810cf9d99b4f /Modules/FindPNG.cmake | |
parent | 416738b7219a2afe94f7ad8bb87df3c121bb9539 (diff) | |
download | CMake-07558db6a23ef711e58678f53ff95b42f879bc44.zip CMake-07558db6a23ef711e58678f53ff95b42f879bc44.tar.gz CMake-07558db6a23ef711e58678f53ff95b42f879bc44.tar.bz2 |
ENH: also look in /usr/local/include/libpng (OpenBSD)
ENH: error out with FATAL_ERROR if REQUIRED was given but png hasn't been
found
Alex
Diffstat (limited to 'Modules/FindPNG.cmake')
-rw-r--r-- | Modules/FindPNG.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake index f078242..797dd02 100644 --- a/Modules/FindPNG.cmake +++ b/Modules/FindPNG.cmake @@ -12,10 +12,13 @@ # PNG depends on Zlib INCLUDE(FindZLIB) +SET(PNG_FOUND "NO") + IF(ZLIB_FOUND) FIND_PATH(PNG_PNG_INCLUDE_DIR png.h /usr/local/include /usr/include + /usr/local/include/libpng # OpenBSD ) SET(PNG_NAMES ${PNG_NAMES} png libpng) @@ -42,4 +45,14 @@ IF(ZLIB_FOUND) ENDIF(ZLIB_FOUND) +IF (PNG_FOUND) + IF (NOT PNG_FIND_QUIETLY) + MESSAGE(STATUS "Found PNG: ${PNG_LIBRARY}") + ENDIF (NOT PNG_FIND_QUIETLY) +ELSE (PNG_FOUND) + IF (PNG_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find PNG library") + ENDIF (PNG_FIND_REQUIRED) +ENDIF (PNG_FOUND) + MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR PNG_LIBRARY ) |