| 1 |
# - Find JPEG |
| 2 |
# Find the native JPEG includes and library |
| 3 |
# This module defines |
| 4 |
# JPEG_INCLUDE_DIR, where to find jpeglib.h, etc. |
| 5 |
# JPEG_LIBRARIES, the libraries needed to use JPEG. |
| 6 |
# JPEG_FOUND, If false, do not try to use JPEG. |
| 7 |
# also defined, but not for general use are |
| 8 |
# JPEG_LIBRARY, where to find the JPEG library. |
| 9 |
|
| 10 |
FIND_PATH(JPEG_INCLUDE_DIR jpeglib.h) |
| 11 |
|
| 12 |
SET(JPEG_NAMES ${JPEG_NAMES} jpeg) |
| 13 |
FIND_LIBRARY(JPEG_LIBRARY NAMES ${JPEG_NAMES} ) |
| 14 |
|
| 15 |
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if |
| 16 |
# all listed variables are TRUE |
| 17 |
INCLUDE(FindPackageHandleStandardArgs) |
| 18 |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR) |
| 19 |
|
| 20 |
IF(JPEG_FOUND) |
| 21 |
SET(JPEG_LIBRARIES ${JPEG_LIBRARY}) |
| 22 |
ENDIF(JPEG_FOUND) |
| 23 |
|
| 24 |
# Deprecated declarations. |
| 25 |
SET (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} ) |
| 26 |
GET_FILENAME_COMPONENT (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH) |
| 27 |
|
| 28 |
MARK_AS_ADVANCED(JPEG_LIBRARY JPEG_INCLUDE_DIR ) |