summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-20 13:55:52 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-06-20 13:55:52 (GMT)
commit5f3bfab7b722f4ea8abe5d433f256507170eab20 (patch)
tree57e36ca0d0bc662036dda24e30aa19d36448829a
parent5c7b2aafbd0e158ab659d68c4d0cf0afb7a9ba65 (diff)
parentb213a7f6ab0d4aa18e7b704bf1cf4994fae77254 (diff)
downloadCMake-5f3bfab7b722f4ea8abe5d433f256507170eab20.zip
CMake-5f3bfab7b722f4ea8abe5d433f256507170eab20.tar.gz
CMake-5f3bfab7b722f4ea8abe5d433f256507170eab20.tar.bz2
Merge topic 'FindFreetype-debug-lib'
b213a7f6 FindFreetype: Find release and debug libraries separately
-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
)