diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-10-28 18:19:27 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-10-28 18:59:07 (GMT) |
commit | 1cfc708eea11df5fd8c438f517e24940b6cc1917 (patch) | |
tree | 13b3a39bd6bf53769f1a935e1cee0f8dbac113ab /Modules | |
parent | ae9890cd36dd2eff99f179f0988ab8bda18e9805 (diff) | |
download | CMake-1cfc708eea11df5fd8c438f517e24940b6cc1917.zip CMake-1cfc708eea11df5fd8c438f517e24940b6cc1917.tar.gz CMake-1cfc708eea11df5fd8c438f517e24940b6cc1917.tar.bz2 |
FindFreeType: handle config-specific `LOCATION` settings as well
`vcpkg` builds release and debug variants on platforms other than
Windows (which uses the `IMPLIB` properties).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindFreetype.cmake | 14 |
1 files changed, 13 insertions, 1 deletions
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) |