summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-09 15:19:15 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-09 15:19:15 +0200
commit203e7b70985b269de64a5b855c0ed9f1c5dfffd9 (patch)
tree233666e3e01800de81b824a2cd09f6399d15ade4 /CMake
parent1b0f21cc8fec9a933770a2ed6d7feafe91ee8333 (diff)
New OPTION_WAYLAND_ONLY for CMake to build pure Wayland platform.
Diffstat (limited to 'CMake')
-rw-r--r--CMake/options.cmake14
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)