diff options
author | Brad King <brad.king@kitware.com> | 2023-10-31 13:10:21 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-10-31 13:10:42 (GMT) |
commit | d33ea3dff5e36e4e2dea39282f20512a8ec5c87f (patch) | |
tree | f1951daa2136fd8e778143a94938e047da8f6891 /Modules | |
parent | 6474d5d03a66ab9ee2de15039f4db96ce7b2c779 (diff) | |
parent | 0117446c97396a9d62ec0f0378c95e49af6d657b (diff) | |
download | CMake-d33ea3dff5e36e4e2dea39282f20512a8ec5c87f.zip CMake-d33ea3dff5e36e4e2dea39282f20512a8ec5c87f.tar.gz CMake-d33ea3dff5e36e4e2dea39282f20512a8ec5c87f.tar.bz2 |
Merge topic 'FindFreeType-config-windows' into release-3.28
0117446c97 FindFreeType: also set `FREETYPE_FOUND`
2cf2d4f7df FindFreeType: insert Freetype's location to the start
1cfc708eea FindFreeType: handle config-specific `LOCATION` settings as well
ae9890cd36 FindFreeType: consider `IMPLIB`-using platforms
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8920
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindFreetype.cmake | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index dcf271d..583d056 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -110,11 +110,41 @@ 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) - list(APPEND FREETYPE_LIBRARIES + 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_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) + endif () + list(INSERT FREETYPE_LIBRARIES 0 "${_Freetype_location}") unset(_Freetype_location) set(Freetype_FOUND 1) + set(FREETYPE_FOUND 1) set(FREETYPE_VERSION_STRING "${freetype_VERSION}") foreach (_Freetype_component IN LISTS Freetype_FIND_COMPONENTS) set(Freetype_${_Freetype_component}_FOUND "${freetype_${_Freetype_component}_FOUND}") |