Never use anaconda's version of libpng because it's broken.

This commit is contained in:
Davis King 2018-06-27 01:56:29 -04:00
parent 6b581d91f6
commit eded3773fe
1 changed files with 3 additions and 2 deletions

View File

@ -405,8 +405,9 @@ if (NOT TARGET dlib)
# try to find libpng # try to find libpng
find_package(PNG QUIET) find_package(PNG QUIET)
# Make sure there isn't something wrong with the version of LIBPNG # Make sure there isn't something wrong with the version of LIBPNG
# installed on this system. # installed on this system. Also never link to anything from anaconda
if (PNG_FOUND) # since it's probably broken.
if (PNG_FOUND AND NOT ("${PNG_INCLUDE_DIR}" MATCHES "(.*)(Ana|ana|mini)conda(.*)"))
set(CMAKE_REQUIRED_LIBRARIES ${PNG_LIBRARIES}) set(CMAKE_REQUIRED_LIBRARIES ${PNG_LIBRARIES})
CHECK_FUNCTION_EXISTS(png_create_read_struct LIBPNG_IS_GOOD) CHECK_FUNCTION_EXISTS(png_create_read_struct LIBPNG_IS_GOOD)
endif() endif()