aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/FindASPELL.cmake4
-rw-r--r--modules/FindBZip2.cmake16
-rw-r--r--modules/FindGIF.cmake66
-rw-r--r--modules/FindHSPELL.cmake5
-rw-r--r--modules/FindJasper.cmake9
-rw-r--r--modules/FindLibArt.cmake2
-rw-r--r--modules/FindPCRE.cmake88
-rw-r--r--modules/FindTIFF.cmake66
-rw-r--r--modules/FindZLIB.cmake72
9 files changed, 148 insertions, 180 deletions
diff --git a/modules/FindASPELL.cmake b/modules/FindASPELL.cmake
index 9d856c60..0333de0c 100644
--- a/modules/FindASPELL.cmake
+++ b/modules/FindASPELL.cmake
@@ -7,6 +7,10 @@
# ASPELL_DEFINITIONS - Compiler switches required for using ASPELL
#
+if (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
+ # Already in cache, be silent
+ set(ASPELL_FIND_QUIETLY TRUE)
+endif (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
FIND_PATH(ASPELL_INCLUDE_DIR aspell.h
/usr/include
diff --git a/modules/FindBZip2.cmake b/modules/FindBZip2.cmake
index 0f05e0bf..9976c282 100644
--- a/modules/FindBZip2.cmake
+++ b/modules/FindBZip2.cmake
@@ -8,14 +8,12 @@
# BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_
-IF (DEFINED CACHED_BZIP2)
+if (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
- # in cache already
- IF ("${CACHED_BZIP2}" STREQUAL "YES")
- SET(BZIP2_FOUND TRUE)
- ENDIF ("${CACHED_BZIP2}" STREQUAL "YES")
+ # in cache already, avoid doing the CHECK_LIBRARY_EXISTS again.
+ SET(BZIP2_FOUND TRUE)
-ELSE (DEFINED CACHED_BZIP2)
+else (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h
/usr/include
@@ -32,9 +30,6 @@ ELSE (DEFINED CACHED_BZIP2)
set(BZIP2_FOUND TRUE)
INCLUDE(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(${BZIP2_LIBRARIES} BZ2_bzCompressInit "" BZIP2_NEED_PREFIX)
- set(CACHED_BZIP2 "YES")
- else (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
- set(CACHED_BZIP2 "NO")
endif (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
if (BZIP2_FOUND)
@@ -47,7 +42,6 @@ ELSE (DEFINED CACHED_BZIP2)
endif (BZip2_FIND_REQUIRED)
endif (BZIP2_FOUND)
- set(CACHED_BZIP2 ${CACHED_BZIP2} CACHE INTERNAL "If bzip2 was checked")
MARK_AS_ADVANCED(BZIP2_INCLUDE_DIR BZIP2_LIBRARIES)
-ENDIF(DEFINED CACHED_BZIP2)
+endif (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
diff --git a/modules/FindGIF.cmake b/modules/FindGIF.cmake
index c809b243..8ea3043a 100644
--- a/modules/FindGIF.cmake
+++ b/modules/FindGIF.cmake
@@ -7,44 +7,34 @@
# GIF_DEFINITIONS - Compiler switches required for using GIF
#
-IF (DEFINED CACHED_GIF)
+if (GIF_INCLUDE_DIR AND GIF_LIBRARIES)
+ # Already in cache, be silent
+ set(GIF_FIND_QUIETLY TRUE)
+endif (GIF_INCLUDE_DIR AND GIF_LIBRARIES)
- # in cache already
- IF ("${CACHED_GIF}" STREQUAL "YES")
- SET(GIF_FOUND TRUE)
- ENDIF ("${CACHED_GIF}" STREQUAL "YES")
+FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
+ /usr/include
+ /usr/local/include
+)
-ELSE (DEFINED CACHED_GIF)
+FIND_LIBRARY(GIF_LIBRARIES NAMES gif libgif ungif libungif giflib
+ PATHS
+ /usr/lib
+ /usr/local/lib
+)
- FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
- /usr/include
- /usr/local/include
- )
-
- FIND_LIBRARY(GIF_LIBRARIES NAMES gif libgif ungif libungif giflib
- PATHS
- /usr/lib
- /usr/local/lib
- )
-
- if (GIF_INCLUDE_DIR AND GIF_LIBRARIES)
- set(GIF_FOUND TRUE)
- set(CACHED_GIF "YES")
- else (GIF_INCLUDE_DIR AND GIF_LIBRARIES)
- set(CACHED_GIF "NO")
- endif (GIF_INCLUDE_DIR AND GIF_LIBRARIES)
-
- if (GIF_FOUND)
- if (NOT GIF_FIND_QUIETLY)
- message(STATUS "Found GIF: ${GIF_LIBRARIES}")
- endif (NOT GIF_FIND_QUIETLY)
- else (GIF_FOUND)
- if (GIF_FIND_REQUIRED)
- message(FATAL_ERROR "Could NOT find GIF")
- endif (GIF_FIND_REQUIRED)
- endif (GIF_FOUND)
-
- set(CACHED_GIF ${CACHED_GIF} CACHE INTERNAL "If gif was checked")
- MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARIES)
-
-ENDIF (DEFINED CACHED_GIF)
+if (GIF_INCLUDE_DIR AND GIF_LIBRARIES)
+ set(GIF_FOUND TRUE)
+endif (GIF_INCLUDE_DIR AND GIF_LIBRARIES)
+
+if (GIF_FOUND)
+ if (NOT GIF_FIND_QUIETLY)
+ message(STATUS "Found GIF: ${GIF_LIBRARIES}")
+ endif (NOT GIF_FIND_QUIETLY)
+else (GIF_FOUND)
+ if (GIF_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find GIF")
+ endif (GIF_FIND_REQUIRED)
+endif (GIF_FOUND)
+
+MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARIES)
diff --git a/modules/FindHSPELL.cmake b/modules/FindHSPELL.cmake
index ba8b21aa..0a029fb8 100644
--- a/modules/FindHSPELL.cmake
+++ b/modules/FindHSPELL.cmake
@@ -7,6 +7,11 @@
# HSPELL_DEFINITIONS - Compiler switches required for using HSPELL
#
+if (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
+ # Already in cache, be silent
+ set(HSPELL_FIND_QUIETLY TRUE)
+endif (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
+
FIND_PATH(HSPELL_INCLUDE_DIR hspell.h
/usr/include
diff --git a/modules/FindJasper.cmake b/modules/FindJasper.cmake
index 9e876fec..9a6f2414 100644
--- a/modules/FindJasper.cmake
+++ b/modules/FindJasper.cmake
@@ -5,6 +5,13 @@
# JASPER_INCLUDE_DIR - the Jasper include directory
# JASPER_LIBRARIES - The libraries needed to use Jasper
+FIND_PACKAGE(JPEG)
+
+if (JASPER_INCLUDE_DIR AND JASPER_LIBRARIES AND JPEG_LIBRARIES)
+ # Already in cache, be silent
+ set(Jasper_FIND_QUIETLY TRUE)
+endif (JASPER_INCLUDE_DIR AND JASPER_LIBRARIES AND JPEG_LIBRARIES)
+
FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h
/usr/include
/usr/local/include
@@ -16,8 +23,6 @@ FIND_LIBRARY(JASPER_LIBRARY NAMES jasper libjasper
/usr/local/lib
)
-FIND_PACKAGE(JPEG)
-
if (JASPER_INCLUDE_DIR AND JASPER_LIBRARIES AND JPEG_LIBRARIES)
set(JASPER_FOUND TRUE)
set(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} )
diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake
index 0ae2c49c..b74da7ee 100644
--- a/modules/FindLibArt.cmake
+++ b/modules/FindLibArt.cmake
@@ -19,6 +19,8 @@ ELSE (DEFINED CACHED_LIBART)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags)
+
+ ######### ?? where is this used ?? ###############
set(LIBART_DEFINITIONS ${_libArtCflags})
ENDIF (NOT WIN32)
diff --git a/modules/FindPCRE.cmake b/modules/FindPCRE.cmake
index f7a7e9cc..16116867 100644
--- a/modules/FindPCRE.cmake
+++ b/modules/FindPCRE.cmake
@@ -5,52 +5,42 @@
# PCRE_INCLUDE_DIR - the PCRE include directory
# PCRE_LIBRARIES - The libraries needed to use PCRE
-IF (DEFINED CACHED_PCRE)
-
- # in cache already
- IF ("${CACHED_PCRE}" STREQUAL "YES")
- SET(PCRE_FOUND TRUE)
- ENDIF ("${CACHED_PCRE}" STREQUAL "YES")
-
-ELSE (DEFINED CACHED_PCRE)
-
- FIND_PATH(PCRE_INCLUDE_DIR pcre.h
- /usr/include/
- /usr/local/include/
- )
-
- FIND_LIBRARY(PCRE_PCRE_LIBRARY NAMES pcre
- PATHS
- /usr/lib
- /usr/local/lib
- )
-
- FIND_LIBRARY(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix
- PATHS
- /usr/lib
- /usr/local/lib
- )
-
- set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY} CACHE STRING "The libraries needed to use PCRE")
-
- if (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES)
- set(PCRE_FOUND TRUE)
- set(CACHED_PCRE "YES")
- else (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES)
- set(CACHED_PCRE "NO")
- endif (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES)
-
- if (PCRE_FOUND)
- if (NOT PCRE_FIND_QUIETLY)
- message(STATUS "Found PCRE: ${PCRE_LIBRARIES}")
- endif (NOT PCRE_FIND_QUIETLY)
- else (PCRE_FOUND)
- if (PCRE_FIND_REQUIRED)
- message(FATAL_ERROR "Could NOT find PCRE")
- endif (PCRE_FIND_REQUIRED)
- endif (PCRE_FOUND)
-
- set(CACHED_PCRE ${CACHED_PCRE} CACHE INTERNAL "If pcre was checked")
- MARK_AS_ADVANCED(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY)
-
-ENDIF (DEFINED CACHED_PCRE)
+if (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES)
+ # Already in cache, be silent
+ set(PCRE_FIND_QUIETLY TRUE)
+endif (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES)
+
+FIND_PATH(PCRE_INCLUDE_DIR pcre.h
+ /usr/include/
+ /usr/local/include/
+)
+
+FIND_LIBRARY(PCRE_PCRE_LIBRARY NAMES pcre
+ PATHS
+ /usr/lib
+ /usr/local/lib
+)
+
+FIND_LIBRARY(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix
+ PATHS
+ /usr/lib
+ /usr/local/lib
+)
+
+set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY} CACHE STRING "The libraries needed to use PCRE")
+
+if (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES)
+ set(PCRE_FOUND TRUE)
+endif (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES)
+
+if (PCRE_FOUND)
+ if (NOT PCRE_FIND_QUIETLY)
+ message(STATUS "Found PCRE: ${PCRE_LIBRARIES}")
+ endif (NOT PCRE_FIND_QUIETLY)
+else (PCRE_FOUND)
+ if (PCRE_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find PCRE")
+ endif (PCRE_FIND_REQUIRED)
+endif (PCRE_FOUND)
+
+MARK_AS_ADVANCED(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY)
diff --git a/modules/FindTIFF.cmake b/modules/FindTIFF.cmake
index 18e051ba..7c6cfd91 100644
--- a/modules/FindTIFF.cmake
+++ b/modules/FindTIFF.cmake
@@ -7,47 +7,35 @@
# also defined, but NOT for general use are
# TIFF_LIBRARY, where to find the TIFF library.
-IF (DEFINED CACHED_TIFF)
+if (TIFF_INCLUDE_DIR)
+ # Already in cache, be silent
+ set(TIFF_FIND_QUIETLY TRUE)
+endif (TIFF_INCLUDE_DIR)
- # in cache already
- IF ("${CACHED_TIFF}" STREQUAL "YES")
- SET(TIFF_FOUND TRUE)
- ENDIF ("${CACHED_TIFF}" STREQUAL "YES")
+FIND_PATH(TIFF_INCLUDE_DIR tiff.h
+ /usr/local/include
+ /usr/include
+)
-ELSE (DEFINED CACHED_TIFF)
+set(TIFF_NAMES ${TIFF_NAMES} tiff libtiff)
+FIND_LIBRARY(TIFF_LIBRARY
+ NAMES ${TIFF_NAMES}
+ PATHS /usr/lib /usr/local/lib
+)
- FIND_PATH(TIFF_INCLUDE_DIR tiff.h
- /usr/local/include
- /usr/include
- )
-
- set(TIFF_NAMES ${TIFF_NAMES} tiff libtiff)
- FIND_LIBRARY(TIFF_LIBRARY
- NAMES ${TIFF_NAMES}
- PATHS /usr/lib /usr/local/lib
- )
-
-
- if (TIFF_INCLUDE_DIR AND TIFF_LIBRARY)
- set(TIFF_FOUND TRUE)
- set(TIFF_LIBRARIES ${TIFF_LIBRARY} )
- set(CACHED_TIFF "YES")
- else (TIFF_INCLUDE_DIR AND TIFF_LIBRARY)
- set(CACHED_TIFF "NO")
- endif (TIFF_INCLUDE_DIR AND TIFF_LIBRARY)
-
-
- if (TIFF_FOUND)
- if (NOT TIFF_FIND_QUIETLY)
- message(STATUS "Found TIFF: ${TIFF_LIBRARY}")
- endif (NOT TIFF_FIND_QUIETLY)
- else (TIFF_FOUND)
- if (TIFF_FIND_REQUIRED)
- message(FATAL_ERROR "Could NOT find TIFF")
- endif (TIFF_FIND_REQUIRED)
- endif (TIFF_FOUND)
+if (TIFF_INCLUDE_DIR AND TIFF_LIBRARY)
+ set(TIFF_FOUND TRUE)
+ set(TIFF_LIBRARIES ${TIFF_LIBRARY} )
+endif (TIFF_INCLUDE_DIR AND TIFF_LIBRARY)
- set(CACHED_TIFF ${CACHED_TIFF} CACHE INTERNAL "If tiff was checked")
- MARK_AS_ADVANCED(TIFF_INCLUDE_DIR TIFF_LIBRARY)
+if (TIFF_FOUND)
+ if (NOT TIFF_FIND_QUIETLY)
+ message(STATUS "Found TIFF: ${TIFF_LIBRARY}")
+ endif (NOT TIFF_FIND_QUIETLY)
+else (TIFF_FOUND)
+ if (TIFF_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find TIFF")
+ endif (TIFF_FIND_REQUIRED)
+endif (TIFF_FOUND)
-ENDIF (DEFINED CACHED_TIFF)
+MARK_AS_ADVANCED(TIFF_INCLUDE_DIR TIFF_LIBRARY)
diff --git a/modules/FindZLIB.cmake b/modules/FindZLIB.cmake
index ecbca6fc..2fcfdd15 100644
--- a/modules/FindZLIB.cmake
+++ b/modules/FindZLIB.cmake
@@ -1,41 +1,31 @@
-IF (DEFINED CACHED_ZLIB)
-
- # in cache already
- IF ("${CACHED_ZLIB}" STREQUAL "YES")
- SET(ZLIB_FOUND TRUE)
- ENDIF ("${CACHED_ZLIB}" STREQUAL "YES")
-
-ELSE (DEFINED CACHED_ZLIB)
-
- FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
- /usr/include
- /usr/local/include
- )
-
- FIND_LIBRARY(ZLIB_LIBRARY NAMES z zlib
- PATHS
- /usr/lib
- /usr/local/lib
- )
-
- IF (ZLIB_INCLUDE_DIR)
- SET(ZLIB_FOUND TRUE)
- SET(CACHED_ZLIB "YES")
- ELSE (ZLIB_INCLUDE_DIR)
- SET(CACHED_ZLIB "NO")
- ENDIF (ZLIB_INCLUDE_DIR)
-
- IF (ZLIB_FOUND)
- IF (NOT ZLIB_FIND_QUIETLY)
- MESSAGE(STATUS "Found Z: ${ZLIB_LIBRARY}")
- ENDIF (NOT ZLIB_FIND_QUIETLY)
- ELSE (ZLIB_FOUND)
- IF (ZLIB_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find z library")
- ENDIF (ZLIB_FIND_REQUIRED)
- ENDIF (ZLIB_FOUND)
-
- SET(CACHED_ZLIB ${CACHED_ZLIB} CACHE INTERNAL "If zlib was checked")
- MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-
-ENDIF (DEFINED CACHED_ZLIB)
+if (ZLIB_INCLUDE_DIR)
+ # Already in cache, be silent
+ set(ZLIB_FIND_QUIETLY TRUE)
+endif (ZLIB_INCLUDE_DIR)
+
+FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
+ /usr/include
+ /usr/local/include
+)
+
+FIND_LIBRARY(ZLIB_LIBRARY NAMES z zlib
+PATHS
+ /usr/lib
+ /usr/local/lib
+)
+
+IF (ZLIB_INCLUDE_DIR)
+ SET(ZLIB_FOUND TRUE)
+ENDIF (ZLIB_INCLUDE_DIR)
+
+IF (ZLIB_FOUND)
+ IF (NOT ZLIB_FIND_QUIETLY)
+ MESSAGE(STATUS "Found Z: ${ZLIB_LIBRARY}")
+ ENDIF (NOT ZLIB_FIND_QUIETLY)
+ELSE (ZLIB_FOUND)
+ IF (ZLIB_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find z library")
+ ENDIF (ZLIB_FIND_REQUIRED)
+ENDIF (ZLIB_FOUND)
+
+MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)