summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-10-26 16:44:29 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-10-26 16:44:29 (GMT)
commitae9890cd36dd2eff99f179f0988ab8bda18e9805 (patch)
tree60f20cc55e0a89a0fc1a3c8c73ab61f527a6d615 /Modules
parente3747a2d4be427e97af01ca1cce1c6641d4dff74 (diff)
downloadCMake-ae9890cd36dd2eff99f179f0988ab8bda18e9805.zip
CMake-ae9890cd36dd2eff99f179f0988ab8bda18e9805.tar.gz
CMake-ae9890cd36dd2eff99f179f0988ab8bda18e9805.tar.bz2
FindFreeType: consider `IMPLIB`-using platforms
See: https://github.com/microsoft/vcpkg/issues/34725
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindFreetype.cmake19
1 files changed, 18 insertions, 1 deletions
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index dcf271d..bebb5f3 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -110,7 +110,24 @@ if (freetype_FOUND)
endif ()
get_property(FREETYPE_INCLUDE_DIRS TARGET freetype PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(FREETYPE_LIBRARIES TARGET freetype PROPERTY INTERFACE_LINK_LIBRARIES)
- get_property(_Freetype_location TARGET freetype PROPERTY LOCATION)
+ get_property(_Freetype_location TARGET freetype PROPERTY IMPORTED_IMPLIB)
+ if (NOT _Freetype_location)
+ get_property(_Freetype_location_release TARGET freetype PROPERTY IMPORTED_IMPLIB_RELEASE)
+ get_property(_Freetype_location_debug TARGET freetype PROPERTY IMPORTED_IMPLIB_DEBUG)
+ if (_Freetype_location_release AND _Freetype_location_debug)
+ set(_Freetype_location
+ optimized "${_Freetype_location_release}"
+ debug "${_Freetype_location_debug}")
+ elseif (_Freetype_location_release)
+ set(_Freetype_location "${_Freetype_location_release}")
+ elseif (_Freetype_location_debug)
+ set(_Freetype_location "${_Freetype_location_debug}")
+ else ()
+ get_property(_Freetype_location TARGET freetype PROPERTY LOCATION)
+ endif ()
+ unset(_Freetype_location_release)
+ unset(_Freetype_location_debug)
+ endif ()
list(APPEND FREETYPE_LIBRARIES
"${_Freetype_location}")
unset(_Freetype_location)