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
This commit is contained in:
parent
416738b721
commit
07558db6a2
|
@ -12,10 +12,13 @@
|
||||||
# PNG depends on Zlib
|
# PNG depends on Zlib
|
||||||
INCLUDE(FindZLIB)
|
INCLUDE(FindZLIB)
|
||||||
|
|
||||||
|
SET(PNG_FOUND "NO")
|
||||||
|
|
||||||
IF(ZLIB_FOUND)
|
IF(ZLIB_FOUND)
|
||||||
FIND_PATH(PNG_PNG_INCLUDE_DIR png.h
|
FIND_PATH(PNG_PNG_INCLUDE_DIR png.h
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/usr/include
|
/usr/include
|
||||||
|
/usr/local/include/libpng # OpenBSD
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(PNG_NAMES ${PNG_NAMES} png libpng)
|
SET(PNG_NAMES ${PNG_NAMES} png libpng)
|
||||||
|
@ -42,4 +45,14 @@ IF(ZLIB_FOUND)
|
||||||
|
|
||||||
ENDIF(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 )
|
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )
|
||||||
|
|
Loading…
Reference in New Issue