2 # Find the native JPEG includes and library
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 #=============================================================================
11 # Copyright 2001-2009 Kitware, Inc.
13 # Distributed under the OSI-approved BSD License (the "License");
14 # see accompanying file Copyright.txt for details.
16 # This software is distributed WITHOUT ANY WARRANTY; without even the
17 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 # See the License for more information.
19 #=============================================================================
20 # (To distribute this file outside of CMake, substitute the full
21 # License text for the above reference.)
23 find_path(JPEG_INCLUDE_DIR jpeglib.h)
25 set(JPEG_NAMES ${JPEG_NAMES} jpeg)
26 find_library(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
28 # handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
29 # all listed variables are TRUE
30 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
31 FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR)
34 set(JPEG_LIBRARIES ${JPEG_LIBRARY})
37 # Deprecated declarations.
38 set (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} )
40 get_filename_component (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH)
43 mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIR )