CMake: find PangoFT2 when wxUSE_PRIVATE_FONTS is enabled in GTK

Rewrite and simplify FindFontconfig.
This commit is contained in:
Maarten Bent
2019-11-27 20:03:54 +01:00
parent 016f00777e
commit a6bfd845b4
4 changed files with 57 additions and 65 deletions

View File

@@ -420,8 +420,9 @@ if(wxUSE_GUI)
if(wxUSE_PRIVATE_FONTS AND WXGTK)
find_package(Fontconfig)
if(NOT FONTCONFIG_FOUND)
message(WARNING "Fontconfig not found, Private fonts won't be available")
find_package(PangoFT2)
if(NOT FONTCONFIG_FOUND OR NOT PANGOFT2_FOUND)
message(WARNING "Fontconfig or PangoFT2 not found, Private fonts won't be available")
wx_option_force_value(wxUSE_PRIVATE_FONTS OFF)
endif()
endif()