From ae9890cd36dd2eff99f179f0988ab8bda18e9805 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 26 Oct 2023 12:44:29 -0400 Subject: FindFreeType: consider `IMPLIB`-using platforms See: https://github.com/microsoft/vcpkg/issues/34725 --- Modules/FindFreetype.cmake | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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) -- cgit v0.12