mirror of https://github.com/davisking/dlib.git
Add cmake option to use external libjpeg on Mac OS
This commit is contained in:
parent
97dc30bc63
commit
01f7fd13ea
|
@ -70,6 +70,8 @@ if (NOT TARGET dlib)
|
|||
"Disable this if you don't want to link against libpng" )
|
||||
set (DLIB_LINK_WITH_LIBJPEG_STR
|
||||
"Disable this if you don't want to link against libjpeg" )
|
||||
set (DLIB_USE_EXTERNAL_LIBJPEG_STR
|
||||
"Enable if this if you want to enforce linking to an external libjpeg on Max OS X systems" )
|
||||
set (DLIB_LINK_WITH_SQLITE3_STR
|
||||
"Disable this if you don't want to link against sqlite3" )
|
||||
#set (DLIB_LINK_WITH_FFTW_STR "Disable this if you don't want to link against fftw" )
|
||||
|
@ -82,6 +84,7 @@ if (NOT TARGET dlib)
|
|||
option(DLIB_USE_LAPACK ${DLIB_USE_LAPACK_STR} ON)
|
||||
option(DLIB_LINK_WITH_LIBPNG ${DLIB_LINK_WITH_LIBPNG_STR} ON)
|
||||
option(DLIB_LINK_WITH_LIBJPEG ${DLIB_LINK_WITH_LIBJPEG_STR} ON)
|
||||
option(DLIB_USE_EXTERNAL_LIBJPEG ${DLIB_USE_EXTERNAL_LIBJPEG_STR} OFF)
|
||||
option(DLIB_LINK_WITH_SQLITE3 ${DLIB_LINK_WITH_SQLITE3_STR} ON)
|
||||
#option(DLIB_LINK_WITH_FFTW ${DLIB_LINK_WITH_FFTW_STR} ON)
|
||||
|
||||
|
@ -279,7 +282,7 @@ if (NOT TARGET dlib)
|
|||
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARY})
|
||||
CHECK_FUNCTION_EXISTS(jpeg_read_header LIBJPEG_IS_GOOD)
|
||||
endif()
|
||||
if (JPEG_FOUND AND LIBJPEG_IS_GOOD AND NOT APPLE)
|
||||
if (JPEG_FOUND AND LIBJPEG_IS_GOOD AND (NOT APPLE OR DLIB_USE_EXTERNAL_LIBJPEG))
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
set (dlib_needed_libraries ${dlib_needed_libraries} ${JPEG_LIBRARY})
|
||||
else()
|
||||
|
|
Loading…
Reference in New Issue