diff options
Diffstat (limited to 'modules/FindGIF.cmake')
| -rw-r--r-- | modules/FindGIF.cmake | 49 | 
1 files changed, 21 insertions, 28 deletions
diff --git a/modules/FindGIF.cmake b/modules/FindGIF.cmake index 14efd818..a46194ab 100644 --- a/modules/FindGIF.cmake +++ b/modules/FindGIF.cmake @@ -5,42 +5,35 @@  #  GIF_INCLUDE_DIR - the GIF include directory  #  GIF_LIBRARIES - Libraries needed to use GIF  #  GIF_DEFINITIONS - Compiler switches required for using GIF -# +  # Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.  # See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. -if (GIF_INCLUDE_DIR AND GIF_LIBRARIES) +IF (GIF_INCLUDE_DIR AND GIF_LIBRARIES)    # Already in cache, be silent -  set(GIF_FIND_QUIETLY TRUE) -endif (GIF_INCLUDE_DIR AND GIF_LIBRARIES) +  SET(GIF_FIND_QUIETLY TRUE) +ENDIF (GIF_INCLUDE_DIR AND GIF_LIBRARIES) -FIND_PATH(GIF_INCLUDE_DIR gif_lib.h -  /usr/include -  /usr/local/include -) +FIND_PATH(GIF_INCLUDE_DIR gif_lib.h) -set(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib) -FIND_LIBRARY(GIF_LIBRARIES NAMES ${POTENTIAL_GIF_LIBS} -  PATHS -  /usr/lib -  /usr/local/lib -) +SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib) +FIND_LIBRARY(GIF_LIBRARIES NAMES ${POTENTIAL_GIF_LIBS}) -if (GIF_INCLUDE_DIR AND GIF_LIBRARIES) -   set(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}" "${CMAKE_REQUIRED_INCLUDES}") +IF (GIF_INCLUDE_DIR AND GIF_LIBRARIES) +   SET(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}" "${CMAKE_REQUIRED_INCLUDES}")     CHECK_STRUCT_MEMBER(GifFileType UserData gif_lib.h GIF_FOUND) -endif (GIF_INCLUDE_DIR AND GIF_LIBRARIES) +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(STATUS "Looked for GIF libraries named ${POTENTIAL_GIF_LIBS}.") -    message(STATUS "Found no acceptable GIF library. This is fatal.") -    message(FATAL_ERROR "Could NOT find GIF") -  endif (GIF_FIND_REQUIRED) -endif (GIF_FOUND) +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(STATUS "Looked for GIF libraries named ${POTENTIAL_GIF_LIBS}.") +    MESSAGE(STATUS "Found no acceptable GIF library. This is fatal.") +    MESSAGE(FATAL_ERROR "Could NOT find GIF") +  ENDIF (GIF_FIND_REQUIRED) +ENDIF (GIF_FOUND)  MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARIES)  | 
