diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/FindLibXml2.cmake | 15 | ||||
| -rw-r--r-- | modules/FindPNG.cmake | 59 | ||||
| -rw-r--r-- | modules/FindTIFF.cmake | 27 | 
3 files changed, 6 insertions, 95 deletions
diff --git a/modules/FindLibXml2.cmake b/modules/FindLibXml2.cmake index 04a73857..fd1a6319 100644 --- a/modules/FindLibXml2.cmake +++ b/modules/FindLibXml2.cmake @@ -53,15 +53,12 @@ IF( NOT LIBXML2_XMLLINT_EXECUTABLE )     MESSAGE(STATUS "xmllint program not found. Install it if you want validate generated doc file.")  ENDIF(NOT LIBXML2_XMLLINT_EXECUTABLE ) -IF (LIBXML2_FOUND) -   IF (NOT LibXml2_FIND_QUIETLY) -      MESSAGE(STATUS "Found LibXml2: ${LIBXML2_LIBRARIES}") -   ENDIF (NOT LibXml2_FIND_QUIETLY) -ELSE (LIBXML2_FOUND) -   IF (LibXml2_FIND_REQUIRED) -      MESSAGE(SEND_ERROR "Could NOT find LibXml2") -   ENDIF (LibXml2_FIND_REQUIRED) -ENDIF (LIBXML2_FOUND) + +INCLUDE(FindPackageHandleStandardArgs) + +# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if  +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)  MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) diff --git a/modules/FindPNG.cmake b/modules/FindPNG.cmake deleted file mode 100644 index d00c93a0..00000000 --- a/modules/FindPNG.cmake +++ /dev/null @@ -1,59 +0,0 @@ -# - Find the native PNG includes and library -# -# This module defines -#  PNG_INCLUDE_DIR, where to find png.h, etc. -#  PNG_LIBRARIES, the libraries to link against to use PNG. -#  PNG_DEFINITIONS - You should ADD_DEFINITONS(${PNG_DEFINITIONS}) before compiling code that includes png library files. -#  PNG_FOUND, If false, do not try to use PNG. -# also defined, but not for general use are -#  PNG_LIBRARY, where to find the PNG library. -# None of the above will be defined unles zlib can be found. -# PNG depends on Zlib - -# Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved. -# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - -INCLUDE(FindZLIB) - -SET(PNG_FOUND "NO") - -IF(ZLIB_FOUND) -  FIND_PATH(PNG_PNG_INCLUDE_DIR png.h -  /usr/local/include/libpng             # OpenBSD -  ) - -  SET(PNG_NAMES ${PNG_NAMES} png libpng png12 libpng12) -  FIND_LIBRARY(PNG_LIBRARY -    NAMES ${PNG_NAMES} -  ) - -  IF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) -      # png.h includes zlib.h. Sigh. -      SET(PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) -      SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY}) -      SET(PNG_FOUND "YES") - -      IF (CYGWIN) -        IF(BUILD_SHARED_LIBS) -           # No need to define PNG_USE_DLL here, because it's default for Cygwin. -        ELSE(BUILD_SHARED_LIBS) -          SET (PNG_DEFINITIONS -DPNG_STATIC) -        ENDIF(BUILD_SHARED_LIBS) -      ENDIF (CYGWIN) - -  ENDIF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) - -ENDIF(ZLIB_FOUND) - -IF (PNG_FOUND) -  IF (NOT PNG_FIND_QUIETLY) -    MESSAGE(STATUS "Found PNG: ${PNG_LIBRARY}") -  ENDIF (NOT PNG_FIND_QUIETLY) -ELSE (PNG_FOUND) -  IF (PNG_FIND_REQUIRED) -    MESSAGE(FATAL_ERROR "Could not find PNG library") -  ENDIF (PNG_FIND_REQUIRED) -ENDIF (PNG_FOUND) - -MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR PNG_LIBRARY ) diff --git a/modules/FindTIFF.cmake b/modules/FindTIFF.cmake deleted file mode 100644 index 829a3485..00000000 --- a/modules/FindTIFF.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# - Find TIFF library -# Find the native TIFF includes and library -# This module defines -#  TIFF_INCLUDE_DIR, where to find tiff.h, etc. -#  TIFF_LIBRARIES, libraries to link against to use TIFF. -#  TIFF_FOUND, If false, do not try to use TIFF. -# also defined, but not for general use are -#  TIFF_LIBRARY, where to find the TIFF library. - -# Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved. -# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - -if (TIFF_INCLUDE_DIR AND TIFF_LIBRARY) -  # Already in cache, be silent -  set(TIFF_FIND_QUIETLY TRUE) -endif (TIFF_INCLUDE_DIR AND TIFF_LIBRARY) - -find_path(TIFF_INCLUDE_DIR NAMES tiff.h ) - -set(TIFF_NAMES ${TIFF_NAMES} tiff libtiff libtiff3) -find_library(TIFF_LIBRARY NAMES ${TIFF_NAMES} ) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(TIFF  DEFAULT_MSG  TIFF_INCLUDE_DIR  TIFF_LIBRARY) - -set(TIFF_LIBRARIES ${TIFF_LIBRARY} ) -mark_as_advanced(TIFF_INCLUDE_DIR TIFF_LIBRARY)  | 
