FindFreeType: consider IMPLIB-using platforms

See: https://github.com/microsoft/vcpkg/issues/34725
This commit is contained in:
Ben Boeckel
2023-10-26 12:44:29 -04:00
parent e3747a2d4b
commit ae9890cd36

View File

@@ -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)