FindX11: require Freetype and Fontconfig for Xft

The Xft header includes headers from freetype and fontconfig, so they
are necessary for its use.
This commit is contained in:
Ben Boeckel
2018-11-12 15:50:05 -05:00
parent cc96249e2e
commit 40b3dba529

View File

@@ -203,7 +203,11 @@ if (UNIX)
endif()
if(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
set(X11_Xft_FOUND TRUE)
find_package(Freetype QUIET)
find_package(Fontconfig QUIET)
if (FREETYPE_FOUND AND FONTCONFIG_FOUND)
set(X11_Xft_FOUND TRUE)
endif ()
list(APPEND X11_INCLUDE_DIR ${X11_Xft_INCLUDE_PATH})
endif()