diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2006-02-15 20:36:22 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2006-02-15 20:36:22 +0000 |
commit | 001e9abc40788b7fb5b7639c972a9b7eab449324 (patch) | |
tree | aebd4c6eacc28ba47c4815ea6124e68e51f275d1 /modules/FindJPEG.cmake | |
parent | dd6f99e06906fa58d4767c20d94747ac8ecc2032 (diff) | |
download | extra-cmake-modules-001e9abc40788b7fb5b7639c972a9b7eab449324.tar.gz extra-cmake-modules-001e9abc40788b7fb5b7639c972a9b7eab449324.tar.bz2 |
find libraries in previously detected gnuwin32 package location
svn path=/trunk/KDE/kdelibs/; revision=509911
Diffstat (limited to 'modules/FindJPEG.cmake')
-rw-r--r-- | modules/FindJPEG.cmake | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/FindJPEG.cmake b/modules/FindJPEG.cmake new file mode 100644 index 00000000..ba3d4f0b --- /dev/null +++ b/modules/FindJPEG.cmake @@ -0,0 +1,36 @@ +# - Find JPEG +# Find the native JPEG includes and library +# This module defines +# JPEG_INCLUDE_DIR, where to find jpeglib.h, etc. +# JPEG_LIBRARIES, the libraries needed to use JPEG. +# JPEG_FOUND, If false, do not try to use JPEG. +# also defined, but not for general use are +# JPEG_LIBRARY, where to find the JPEG library. + +FIND_PATH(JPEG_INCLUDE_DIR jpeglib.h +/usr/local/include +/usr/include +${GNUWIN32_DIR}/include +) + +SET(JPEG_NAMES ${JPEG_NAMES} jpeg) +FIND_LIBRARY(JPEG_LIBRARY + NAMES ${JPEG_NAMES} + PATHS /usr/lib /usr/local/lib ${GNUWIN32_DIR}/lib + ) + +IF (JPEG_LIBRARY) + IF (JPEG_INCLUDE_DIR) + SET(JPEG_LIBRARIES ${JPEG_LIBRARY}) + SET(JPEG_FOUND "YES") + ENDIF (JPEG_INCLUDE_DIR) +ENDIF (JPEG_LIBRARY) + +# Deprecated declarations. +SET (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} ) +GET_FILENAME_COMPONENT (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH) + +MARK_AS_ADVANCED( + JPEG_LIBRARY + JPEG_INCLUDE_DIR + ) |