summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorStuart Mentzer <Stuart_Mentzer@objexx.com>2016-06-12 17:52:36 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-17 15:52:18 (GMT)
commitb213a7f6ab0d4aa18e7b704bf1cf4994fae77254 (patch)
tree9aa2ad3da1190912885004655dd5d00669b057d0 /Modules
parent9e4725560493fdac423102469da6dbe1779383c4 (diff)
downloadCMake-b213a7f6ab0d4aa18e7b704bf1cf4994fae77254.zip
CMake-b213a7f6ab0d4aa18e7b704bf1cf4994fae77254.tar.gz
CMake-b213a7f6ab0d4aa18e7b704bf1cf4994fae77254.tar.bz2
FindFreetype: Find release and debug libraries separately
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindFreetype.cmake32
1 files changed, 22 insertions, 10 deletions
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index dc6336d..e38e5ed 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -87,15 +87,28 @@ find_path(
freetype2
)
-find_library(FREETYPE_LIBRARY
- NAMES
- freetype
- libfreetype
- freetype219
- ${FREETYPE_FIND_ARGS}
- PATH_SUFFIXES
- lib
-)
+if(NOT FREETYPE_LIBRARY)
+ find_library(FREETYPE_LIBRARY_RELEASE
+ NAMES
+ freetype
+ libfreetype
+ freetype219
+ ${FREETYPE_FIND_ARGS}
+ PATH_SUFFIXES
+ lib
+ )
+ find_library(FREETYPE_LIBRARY_DEBUG
+ NAMES
+ freetyped
+ libfreetyped
+ freetype219d
+ ${FREETYPE_FIND_ARGS}
+ PATH_SUFFIXES
+ lib
+ )
+ include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ select_library_configurations(FREETYPE)
+endif()
unset(FREETYPE_FIND_ARGS)
@@ -147,7 +160,6 @@ find_package_handle_standard_args(
)
mark_as_advanced(
- FREETYPE_LIBRARY
FREETYPE_INCLUDE_DIR_freetype2
FREETYPE_INCLUDE_DIR_ft2build
)