ENH: rename variables from GIFLIB_* to GIF_*
-add standard QUIET and REQUIRED handling -add GIF_LIBRARIES variable as readme.txt says -add name giflib to the names for the gif library -remove some unnecessary search paths for the lib (they are already part of the standard search paths, see Modules/Platform/UnixPaths.cmake) -FindFreetype.cmake: use PATH_SUFFIXES include again for the headers with the CMAKE_PREFIX_PATH variable Alex
This commit is contained in:
parent
daa45056c9
commit
eed9b1b0da
|
@ -10,7 +10,11 @@
|
||||||
# $FREETYPE_DIR is an environment variable that would
|
# $FREETYPE_DIR is an environment variable that would
|
||||||
# correspond to the ./configure --prefix=$FREETYPE_DIR
|
# correspond to the ./configure --prefix=$FREETYPE_DIR
|
||||||
# used in building FREETYPE.
|
# used in building FREETYPE.
|
||||||
|
|
||||||
# Created by Eric Wing.
|
# Created by Eric Wing.
|
||||||
|
# Modifications by Alexander Neundorf.
|
||||||
|
# This file has been renamed to "FindFreetype.cmake" instead of the correct
|
||||||
|
# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex.
|
||||||
|
|
||||||
# Ugh, FreeType seems to use some #include trickery which
|
# Ugh, FreeType seems to use some #include trickery which
|
||||||
# makes this harder than it should be. It looks like they
|
# makes this harder than it should be. It looks like they
|
||||||
|
@ -27,11 +31,12 @@
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
||||||
$ENV{FREETYPE_DIR}
|
$ENV{FREETYPE_DIR}
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
PATH_SUFFIXES include
|
PATH_SUFFIXES include
|
||||||
)
|
)
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
||||||
PATHS ${CMAKE_PREFIX_PATH}/include # Unofficial: We are proposing this.
|
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
|
PATH_SUFFIXES include
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
||||||
|
@ -49,9 +54,9 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
)
|
)
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
||||||
PATHS ${CMAKE_PREFIX_PATH}/include # Unofficial: We are proposing this.
|
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
PATH_SUFFIXES freetype2
|
PATH_SUFFIXES include/freetype2
|
||||||
)
|
)
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
||||||
/usr/local/X11R6/include
|
/usr/local/X11R6/include
|
||||||
|
@ -79,16 +84,10 @@ FIND_LIBRARY(FREETYPE_LIBRARY
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY
|
FIND_LIBRARY(FREETYPE_LIBRARY
|
||||||
NAMES freetype libfreetype freetype219
|
NAMES freetype libfreetype freetype219
|
||||||
PATHS
|
PATHS
|
||||||
/usr/local
|
|
||||||
/usr
|
|
||||||
/usr/local/X11R6
|
/usr/local/X11R6
|
||||||
/usr/local/X11
|
/usr/local/X11
|
||||||
/usr/X11R6
|
|
||||||
/usr/X11
|
/usr/X11
|
||||||
/sw
|
/sw
|
||||||
/opt/local
|
|
||||||
/opt/csw
|
|
||||||
/opt
|
|
||||||
/usr/freeware
|
/usr/freeware
|
||||||
PATH_SUFFIXES lib64 lib
|
PATH_SUFFIXES lib64 lib
|
||||||
)
|
)
|
||||||
|
@ -99,7 +98,7 @@ IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
|
SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set PERLLIBS_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
|
||||||
|
|
|
@ -1,57 +1,56 @@
|
||||||
# This module defines
|
# This module defines
|
||||||
# GIFLIB_LIBRARY
|
# GIF_LIBRARIES - libraries to link to in order to use GIF
|
||||||
# GIFLIB_FOUND, if false, do not try to link
|
# GIF_FOUND, if false, do not try to link
|
||||||
# GIFLIB_INCLUDE_DIR, where to find the headers
|
# GIF_INCLUDE_DIR, where to find the headers
|
||||||
#
|
#
|
||||||
# $GIFLIB_DIR is an environment variable that would
|
# $GIF_DIR is an environment variable that would
|
||||||
# correspond to the ./configure --prefix=$GIFLIB_DIR
|
# correspond to the ./configure --prefix=$GIF_DIR
|
||||||
#
|
|
||||||
# Created by Eric Wing.
|
|
||||||
|
|
||||||
FIND_PATH(GIFLIB_INCLUDE_DIR gif_lib.h
|
# Created by Eric Wing.
|
||||||
|
# Modifications by Alexander Neundorf
|
||||||
|
|
||||||
|
FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{GIFLIB_DIR}
|
$ENV{GIF_DIR}
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
PATH_SUFFIXES include
|
PATH_SUFFIXES include
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(GIFLIB_INCLUDE_DIR gif_lib.h
|
FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
|
||||||
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
PATH_SUFFIXES include
|
PATH_SUFFIXES include
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(GIFLIB_INCLUDE_DIR gif_lib.h
|
FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
|
||||||
PATHS
|
PATHS
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
/Library/Frameworks
|
/Library/Frameworks
|
||||||
/usr/local/include
|
|
||||||
/usr/include
|
|
||||||
/sw/include # Fink
|
/sw/include # Fink
|
||||||
/opt/local/include # DarwinPorts
|
|
||||||
/opt/csw/include # Blastwave
|
|
||||||
/opt/include
|
|
||||||
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||||
/usr/freeware/include
|
/usr/freeware/include
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(GIFLIB_LIBRARY
|
# the gif library can have many names :-/
|
||||||
NAMES gif ungif libgif libungif
|
SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib)
|
||||||
|
|
||||||
|
FIND_LIBRARY(GIF_LIBRARY
|
||||||
|
NAMES ${POTENTIAL_GIF_LIBS}
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{GIFLIB_DIR}
|
$ENV{GIF_DIR}
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
PATH_SUFFIXES lib64 lib
|
PATH_SUFFIXES lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(GIFLIB_LIBRARY
|
FIND_LIBRARY(GIF_LIBRARY
|
||||||
NAMES gif ungif libgif libungif
|
NAMES ${POTENTIAL_GIF_LIBS}
|
||||||
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
PATH_SUFFIXES lib64 lib
|
PATH_SUFFIXES lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(GIFLIB_LIBRARY
|
FIND_LIBRARY(GIF_LIBRARY
|
||||||
NAMES gif ungif libgif libungif
|
NAMES ${POTENTIAL_GIF_LIBS}
|
||||||
PATHS
|
PATHS
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
/Library/Frameworks
|
/Library/Frameworks
|
||||||
|
@ -66,9 +65,12 @@ FIND_LIBRARY(GIFLIB_LIBRARY
|
||||||
PATH_SUFFIXES lib64 lib
|
PATH_SUFFIXES lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(GIFLIB_FOUND "NO")
|
# see readme.txt
|
||||||
IF(GIFLIB_LIBRARY AND GIFLIB_INCLUDE_DIR)
|
SET(GIF_LIBRARIES ${GIF_LIBRARY})
|
||||||
SET(GIFLIB_FOUND "YES")
|
|
||||||
ENDIF(GIFLIB_LIBRARY AND GIFLIB_INCLUDE_DIR)
|
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF DEFAULT_MSG GIF_LIBRARY GIF_INCLUDE_DIR)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY)
|
||||||
|
|
Loading…
Reference in New Issue