diff options
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/options.cmake | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake index e91d1c828..132f435a1 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -194,10 +194,18 @@ set (HAVE_LIBPNG 1) if (UNIX) option (OPTION_CREATE_LINKS "create backwards compatibility links" OFF) list (APPEND FLTK_LDLIBS -lm) - option (OPTION_USE_WAYLAND "use Wayland" OFF) + option (OPTION_USE_WAYLAND "support Wayland and X11 backends" OFF) if (OPTION_USE_WAYLAND) + option (OPTION_WAYLAND_ONLY "support Wayland backend only" OFF) set (FLTK_USE_WAYLAND 1) - set (FLTK_USE_X11 1) # to build a hybrid Wayland/X11 library + if (NOT OPTION_WAYLAND_ONLY) + include (FindX11) + endif (NOT OPTION_WAYLAND_ONLY) + if (X11_FOUND) + set (FLTK_USE_X11 1) # to build a hybrid Wayland/X11 library + else () + set (FLTK_USE_X11 0) # to build a Wayland-only library + endif (X11_FOUND) unset (OPTION_USE_CAIRO CACHE) set (OPTION_USE_CAIRO TRUE CACHE BOOL "all drawing to X11 windows uses Cairo") option (OPTION_USE_SYSTEM_LIBDECOR "use libdecor from the system" OFF) @@ -206,11 +214,13 @@ if (UNIX) unset (OPTION_USE_XFT CACHE) unset (OPTION_USE_XCURSOR CACHE) unset (OPTION_USE_XFIXES CACHE) + if (X11_FOUND) set (HAVE_XFIXES 1) set (HAVE_XRENDER 1) set (USE_XFT 1) set (HAVE_XCURSOR 1) set (HAVE_XINERAMA 1) + endif (X11_FOUND) unset (OPTION_USE_PANGO CACHE) set (OPTION_USE_PANGO TRUE CACHE BOOL "use lib Pango") if (OPTION_USE_SYSTEM_LIBDECOR) |
