CMake: only do jpeg-turbo tests if a libjpeg was found

pull/3/head
Christian Beier 6 years ago
parent d6c907ffbc
commit 77dce5b6af
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8

@ -58,6 +58,7 @@ endif(WITH_ZLIB)
if(WITH_JPEG)
find_package(JPEG)
if(JPEG_FOUND)
# Check whether the version of libjpeg we found was libjpeg-turbo and print a
# warning if not.
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES})
@ -91,6 +92,7 @@ if(WITH_JPEG)
if(NOT FOUND_LIBJPEG_TURBO)
message(WARNING "*** The libjpeg library you are building against is not libjpeg-turbo. Performance will be reduced. You can obtain libjpeg-turbo from: https://sourceforge.net/projects/libjpeg-turbo/files/ ***")
endif()
endif(JPEG_FOUND)
endif(WITH_JPEG)

Loading…
Cancel
Save