fixed: auto_ptr -> unique_ptr
[opensg.git] / CMake / FindJPEG_OpenSG.cmake
blobbf3092c25c913fefb16fb298789cb71607a58b8f
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.
10 FIND_PATH(JPEG_INCLUDE_DIR jpeglib.h)
12 SET(JPEG_NAMES_RELEASE ${JPEG_NAMES_RELEASE} jpeg)
13 FIND_LIBRARY(JPEG_LIBRARY_RELEASE NAMES ${JPEG_NAMES_RELEASE} )
15 SET(JPEG_NAMES_DEBUG ${JPEG_NAMES_DEBUG} jpegd)
16 FIND_LIBRARY(JPEG_LIBRARY_DEBUG NAMES ${JPEG_NAMES_DEBUG} )
18 IF(JPEG_LIBRARY_DEBUG)
19   SET(JPEG_LIBRARIES_FOUND TRUE)
20   MARK_AS_ADVANCED(JPEG_LIBRARY_DEBUG)
21 ENDIF(JPEG_LIBRARY_DEBUG)
23 IF(JPEG_LIBRARY_RELEASE)
24   SET(JPEG_LIBRARIES_FOUND TRUE)
25   MARK_AS_ADVANCED(JPEG_LIBRARY_RELEASE)
26 ENDIF(JPEG_LIBRARY_RELEASE)
28 # handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if 
29 # all listed variables are TRUE
30 INCLUDE(FindPackageHandleStandardArgs)
31 FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG 
32                                   JPEG_LIBRARIES_FOUND JPEG_INCLUDE_DIR)
34 #IF(JPEG_FOUND)
35 #  SET(JPEG_LIBRARIES ${JPEG_LIBRARY})
36 #ENDIF(JPEG_FOUND)
38 # Deprecated declarations.
39 #SET (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} )
40 #IF(JPEG_LIBRARY)
41 #  GET_FILENAME_COMPONENT (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH)
42 #ENDIF(JPEG_LIBRARY)
44 MARK_AS_ADVANCED(JPEG_LIBRARIES_FOUND JPEG_INCLUDE_DIR )