FindFreeType: handle config-specific LOCATION settings as well

`vcpkg` builds release and debug variants on platforms other than
Windows (which uses the `IMPLIB` properties).
This commit is contained in:
Ben Boeckel
2023-10-28 14:19:27 -04:00
parent ae9890cd36
commit 1cfc708eea

View File

@@ -123,7 +123,19 @@ if (freetype_FOUND)
elseif (_Freetype_location_debug)
set(_Freetype_location "${_Freetype_location_debug}")
else ()
get_property(_Freetype_location TARGET freetype PROPERTY LOCATION)
get_property(_Freetype_location_release TARGET freetype PROPERTY LOCATION_RELEASE)
get_property(_Freetype_location_debug TARGET freetype PROPERTY LOCATION_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 ()
endif ()
unset(_Freetype_location_release)
unset(_Freetype_location_debug)