From c6dee72b06e9372a2659874073c729c6cc3b56c8 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Mon, 15 Oct 2018 16:18:18 -0600 Subject: [PATCH] CMake: Make sure Xkb+Xutil are available for X11 This fixes a compile error on some macOS systems. --- dtool/Config.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dtool/Config.cmake b/dtool/Config.cmake index 803a451428..877844380e 100644 --- a/dtool/Config.cmake +++ b/dtool/Config.cmake @@ -485,14 +485,15 @@ mark_as_advanced(SDL_LIBRARY_TEMP) # Is X11 insalled, and where? 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 "Provides X-server support on Unix platforms. X11 may need to be linked 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