diff options
author | Allen Winter <allen.winter@kdab.com> | 2011-06-30 17:36:45 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2011-06-30 17:36:45 -0400 |
commit | d2b2c90a06bf1f4a21df196430d1f95856900410 (patch) | |
tree | aba9d2a48d7b2ac1e960e1b68218394524c7e6a8 /attic/modules/FindGIF.cmake | |
parent | e15ffacc69242c89107afbfda6f8ece9f2b56633 (diff) | |
download | extra-cmake-modules-d2b2c90a06bf1f4a21df196430d1f95856900410.tar.gz extra-cmake-modules-d2b2c90a06bf1f4a21df196430d1f95856900410.tar.bz2 |
Move the modules, modules-test and systeminfo subdirs into 'attic'
Diffstat (limited to 'attic/modules/FindGIF.cmake')
-rw-r--r-- | attic/modules/FindGIF.cmake | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/attic/modules/FindGIF.cmake b/attic/modules/FindGIF.cmake new file mode 100644 index 00000000..3dc400cf --- /dev/null +++ b/attic/modules/FindGIF.cmake @@ -0,0 +1,39 @@ +# - Try to find GIF +# Once done this will define +# +# GIF_FOUND - system has GIF +# 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) + # Already in cache, be silent + SET(GIF_FIND_QUIETLY TRUE) +ENDIF (GIF_INCLUDE_DIR AND GIF_LIBRARIES) + +FIND_PATH(GIF_INCLUDE_DIR gif_lib.h) + +SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib giflib4) +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}") + CHECK_STRUCT_MEMBER(GifFileType UserData gif_lib.h GIF_FOUND) +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) + +MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARIES) |