Browse Source

FindX11: require Freetype and Fontconfig for Xft

The Xft header includes headers from freetype and fontconfig, so they
are necessary for its use.
Ben Boeckel 7 years ago
parent
commit
40b3dba529
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Modules/FindX11.cmake

+ 5 - 1
Modules/FindX11.cmake

@@ -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()