diff options
author | Brad King <brad.king@kitware.com> | 2016-06-10 13:09:59 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-06-10 13:09:59 (GMT) |
commit | fbf461dde26aca7bb4b44d0f25e459ea30e3aa87 (patch) | |
tree | 997bce92177871a82d0f3a4bc92ed281c4693dc8 /Modules | |
parent | 09e6c9eba7905b4af19dcdc18d8fe5c8d337218c (diff) | |
parent | 746a4245738c7b3c0b29754cb09b2230697f13fc (diff) | |
download | CMake-fbf461dde26aca7bb4b44d0f25e459ea30e3aa87.zip CMake-fbf461dde26aca7bb4b44d0f25e459ea30e3aa87.tar.gz CMake-fbf461dde26aca7bb4b44d0f25e459ea30e3aa87.tar.bz2 |
Merge topic 'FindFreetype-dedup-arguments'
746a4245 FindFreetype: Factor out common find command arguments
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindFreetype.cmake | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 7d46d15..dc6336d 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -51,9 +51,8 @@ # wants explicit full paths and this trickery doesn't work too well. # I'm going to attempt to cut out the middleman and hope # everything still works. -find_path( - FREETYPE_INCLUDE_DIR_ft2build - ft2build.h + +set(FREETYPE_FIND_ARGS HINTS ENV FREETYPE_DIR PATHS @@ -64,6 +63,12 @@ find_path( ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] +) + +find_path( + FREETYPE_INCLUDE_DIR_ft2build + ft2build.h + ${FREETYPE_FIND_ARGS} PATH_SUFFIXES include/freetype2 include @@ -75,16 +80,7 @@ find_path( NAMES freetype/config/ftheader.h config/ftheader.h - HINTS - ENV FREETYPE_DIR - PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - ENV GTKMM_BASEPATH - [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] + ${FREETYPE_FIND_ARGS} PATH_SUFFIXES include/freetype2 include @@ -96,20 +92,13 @@ find_library(FREETYPE_LIBRARY freetype libfreetype freetype219 - HINTS - ENV FREETYPE_DIR - PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - ENV GTKMM_BASEPATH - [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] + ${FREETYPE_FIND_ARGS} PATH_SUFFIXES lib ) +unset(FREETYPE_FIND_ARGS) + # set the user variables if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") |