mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Made cmake not use the installed libjpeg on apple systems because it's broken
on some newer OS X installs.
This commit is contained in:
parent
01f030dda1
commit
132b1abd1f
@ -271,10 +271,11 @@ if (NOT TARGET dlib)
|
||||
# try to find libjpeg
|
||||
find_package(JPEG QUIET)
|
||||
# Make sure there isn't something wrong with the version of libjpeg
|
||||
# installed on this system.
|
||||
# installed on this system. Also don't use the installed libjpeg
|
||||
# if this is an APPLE system because apparently it's broken (as of 2015/01/01).
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARY})
|
||||
CHECK_FUNCTION_EXISTS(jpeg_read_header LIBJPEG_IS_GOOD)
|
||||
if (JPEG_FOUND AND LIBJPEG_IS_GOOD)
|
||||
if (JPEG_FOUND AND LIBJPEG_IS_GOOD AND NOT APPLE)
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
set (dlib_needed_libraries ${dlib_needed_libraries} ${JPEG_LIBRARY})
|
||||
else()
|
||||
|
Loading…
Reference in New Issue
Block a user