Browse Source

CMake: Make sure Xkb+Xutil are available for X11

This fixes a compile error on some macOS systems.
Sam Edwards 7 years ago
parent
commit
c6dee72b06
1 changed files with 6 additions and 5 deletions
  1. 6 5
      dtool/Config.cmake

+ 6 - 5
dtool/Config.cmake

@@ -485,14 +485,15 @@ mark_as_advanced(SDL_LIBRARY_TEMP)
 # Is X11 insalled, and where?
 # Is X11 insalled, and where?
 find_package(X11 QUIET)
 find_package(X11 QUIET)
 
 
+if(NOT X11_Xkb_FOUND OR NOT X11_Xutil_FOUND)
+  # Panda implicitly requires these supplementary X11 libs; if we can't find
+  # them, we just say we didn't find X11 at all.
+  set(X11_FOUND OFF)
+endif()
+
 package_option(X11
 package_option(X11
   "Provides X-server support on Unix platforms. X11 may need to be linked
   "Provides X-server support on Unix platforms. X11 may need to be linked
 against for tinydisplay, but probably only on a Linux platform.")
 against for tinydisplay, but probably only on a Linux platform.")
-if(NOT UNIX AND HAVE_X11)
-  message(SEND_ERROR
-    "X11 support is only supported on Unix platforms:
-ie. Linux, BSD, OS X, Cygwin, etc...")
-endif()
 
 
 
 
 # TODO: XF86DGA
 # TODO: XF86DGA