khanat-code-old/code/CMakeModules/FindJpeg.cmake

51 lines
965 B
CMake
Raw Normal View History

2010-05-06 00:08:41 +00:00
# - Locate Jpeg library
# This module defines
# JPEG_LIBRARY, the library to link against
# JPEG_FOUND, if false, do not try to link to JPEG
# JPEG_INCLUDE_DIR, where to find headers.
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
# in cache already
SET(JPEG_FIND_QUIETLY TRUE)
2016-10-27 08:54:09 +00:00
ENDIF()
2010-05-06 00:08:41 +00:00
FIND_PATH(JPEG_INCLUDE_DIR
jpeglib.h
PATHS
$ENV{JPEG_DIR}/include
/usr/local/include
/usr/include
/sw/include
/opt/local/include
/opt/csw/include
/opt/include
PATH_SUFFIXES jpeg
)
FIND_LIBRARY(JPEG_LIBRARY
NAMES jpeg libjpeg
PATHS
$ENV{JPEG_DIR}/lib
/usr/local/lib
/usr/lib
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
SET(JPEG_FOUND "YES")
IF(NOT JPEG_FIND_QUIETLY)
MESSAGE(STATUS "Found Jpeg: ${JPEG_LIBRARY}")
2016-10-27 08:54:09 +00:00
ENDIF()
ELSE()
2010-05-06 00:08:41 +00:00
IF(NOT JPEG_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Jpeg!")
2016-10-27 08:54:09 +00:00
ENDIF()
ENDIF()