summaryrefslogtreecommitdiff
path: root/Modules/FindJPEG.cmake
diff options
context:
space:
mode:
authorIan Scott <ian.m.scott@stud.man.ac.uk>2002-09-02 12:05:40 -0400
committerIan Scott <ian.m.scott@stud.man.ac.uk>2002-09-02 12:05:40 -0400
commit5f60153d2fbbb73cb180e7a34adb91505fe1077a (patch)
tree54a095559842cf9f9657d88cfd79fb29e986c6be /Modules/FindJPEG.cmake
parent63d64d5780aa189324800e70feb6345a73b8e8a3 (diff)
downloadcmake-5f60153d2fbbb73cb180e7a34adb91505fe1077a.tar.gz
Add helpful message for QT Windows users
Add FindZLib in new format Move FindJPEG and FINDWGET over to new scheme
Diffstat (limited to 'Modules/FindJPEG.cmake')
-rw-r--r--Modules/FindJPEG.cmake23
1 files changed, 20 insertions, 3 deletions
diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake
index a72aa515f5..0ca8055437 100644
--- a/Modules/FindJPEG.cmake
+++ b/Modules/FindJPEG.cmake
@@ -1,14 +1,31 @@
#
# Find the native JPEG includes and library
#
+# This module defines
+# JPEG_INCLUDE_DIR, where to find jpeglib.h, etc.
+# JPEG_LIBRARIES, the libraries to link against to use JPEG.
+# JPEG_FOUND, If false, do try to use JPEG.
+# also defined, but not for general use are
+# JPEG_LIBRARY, where to find the JPEG library.
-FIND_PATH(NATIVE_JPEG_INCLUDE_PATH jpeglib.h
+FIND_PATH(JPEG_INCLUDE_DIR jpeglib.h
/usr/local/include
/usr/include
)
-FIND_LIBRARY(NATIVE_JPEG_LIB_PATH jpeg
-PATHS /usr/lib /usr/local/lib
+FIND_LIBRARY(JPEG_LIBRARY jpeg
+/usr/lib
+/usr/local/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)