From 1cfc708eea11df5fd8c438f517e24940b6cc1917 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 28 Oct 2023 14:19:27 -0400 Subject: FindFreeType: handle config-specific `LOCATION` settings as well `vcpkg` builds release and debug variants on platforms other than Windows (which uses the `IMPLIB` properties). --- Modules/FindFreetype.cmake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index bebb5f3..cd18f2c 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -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) -- cgit v0.12