FindFreetype: Add newlines to reduce code width

This also makes argument lists easier to update.
This commit is contained in:
Taylor Holberton 2014-05-24 21:34:01 -07:00 committed by Brad King
parent 41a0fde1c9
commit 4ad6dacede
1 changed files with 30 additions and 9 deletions

View File

@ -51,7 +51,9 @@
# wants explicit full paths and this trickery doesn't work too well. # wants explicit full paths and this trickery doesn't work too well.
# I'm going to attempt to cut out the middleman and hope # I'm going to attempt to cut out the middleman and hope
# everything still works. # everything still works.
find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h find_path(
FREETYPE_INCLUDE_DIR_ft2build
ft2build.h
HINTS HINTS
ENV FREETYPE_DIR ENV FREETYPE_DIR
PATHS PATHS
@ -62,10 +64,14 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
ENV GTKMM_BASEPATH ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
PATH_SUFFIXES include/freetype2 include freetype2 PATH_SUFFIXES
include/freetype2
include
freetype2
) )
find_path(FREETYPE_INCLUDE_DIR_freetype2 find_path(
FREETYPE_INCLUDE_DIR_freetype2
NAMES NAMES
freetype/config/ftheader.h freetype/config/ftheader.h
config/ftheader.h config/ftheader.h
@ -79,11 +85,17 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2
ENV GTKMM_BASEPATH ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
PATH_SUFFIXES include/freetype2 include freetype2 PATH_SUFFIXES
include/freetype2
include
freetype2
) )
find_library(FREETYPE_LIBRARY find_library(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219 NAMES
freetype
libfreetype
freetype219
HINTS HINTS
ENV FREETYPE_DIR ENV FREETYPE_DIR
PATH_SUFFIXES lib PATH_SUFFIXES lib
@ -134,8 +146,17 @@ endif()
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_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(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype FIND_PACKAGE_HANDLE_STANDARD_ARGS(
REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS Freetype
VERSION_VAR FREETYPE_VERSION_STRING) REQUIRED_VARS
FREETYPE_LIBRARY
FREETYPE_INCLUDE_DIRS
VERSION_VAR
FREETYPE_VERSION_STRING
)
mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) mark_as_advanced(
FREETYPE_LIBRARY
FREETYPE_INCLUDE_DIR_freetype2
FREETYPE_INCLUDE_DIR_ft2build
)