From eded3773fe25666eccf2a79657ce76adbfa46471 Mon Sep 17 00:00:00 2001 From: Davis King Date: Wed, 27 Jun 2018 01:56:29 -0400 Subject: [PATCH] Never use anaconda's version of libpng because it's broken. --- dlib/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt index b80f10756..e753cfd9e 100644 --- a/dlib/CMakeLists.txt +++ b/dlib/CMakeLists.txt @@ -405,8 +405,9 @@ if (NOT TARGET dlib) # try to find libpng find_package(PNG QUIET) # Make sure there isn't something wrong with the version of LIBPNG - # installed on this system. - if (PNG_FOUND) + # installed on this system. Also never link to anything from anaconda + # since it's probably broken. + if (PNG_FOUND AND NOT ("${PNG_INCLUDE_DIR}" MATCHES "(.*)(Ana|ana|mini)conda(.*)")) set(CMAKE_REQUIRED_LIBRARIES ${PNG_LIBRARIES}) CHECK_FUNCTION_EXISTS(png_create_read_struct LIBPNG_IS_GOOD) endif()