summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-06-03 16:19:27 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-06-03 16:19:27 +0200
commitb371c1185c9cf937f48d2ed083d708e80211f38e (patch)
tree45406c6320c5d1ae0870c5f0898dde7938745808 /CMake
parent85be70efa516bccb375bd7c011a2882a064c24da (diff)
Add build option FLTK_USE_DBUS to allow build w/o dbus (PR #1252)
Thanks to @lanodan for most of the source code.
Diffstat (limited to 'CMake')
-rw-r--r--CMake/options.cmake1
-rw-r--r--CMake/variables.cmake5
2 files changed, 5 insertions, 1 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake
index 1ef64aad4..ea265515b 100644
--- a/CMake/options.cmake
+++ b/CMake/options.cmake
@@ -320,6 +320,7 @@ if(UNIX)
endif()
unset(FLTK_GRAPHICS_CAIRO CACHE)
set(FLTK_GRAPHICS_CAIRO TRUE CACHE BOOL "all drawing to X11 windows uses Cairo")
+ option(FLTK_USE_DBUS "use D-Bus - required to detect the cursor theme" ON)
option(FLTK_USE_SYSTEM_LIBDECOR "use libdecor from the system" ON)
set(USE_SYSTEM_LIBDECOR 1)
unset(FLTK_USE_XRENDER CACHE)
diff --git a/CMake/variables.cmake b/CMake/variables.cmake
index b2993f032..6fcaed395 100644
--- a/CMake/variables.cmake
+++ b/CMake/variables.cmake
@@ -44,9 +44,12 @@ if(WIN32)
elseif(APPLE AND NOT FLTK_BACKEND_X11)
list(APPEND FLTK_LDLIBS ${FLTK_COCOA_FRAMEWORKS})
elseif(FLTK_USE_WAYLAND)
- foreach(_lib WLDCURSOR WLDCLIENT XKBCOMMON DBUS)
+ foreach(_lib WLDCURSOR WLDCLIENT XKBCOMMON)
list(APPEND FLTK_LDLIBS "${${_lib}_LDFLAGS}")
endforeach()
+ if(FLTK_USE_DBUS AND DBUS_FOUND)
+ list(APPEND FLTK_LDLIBS "${DBUS_LDFLAGS}")
+ endif()
if(USE_SYSTEM_LIBDECOR)
list(APPEND FLTK_LDLIBS ${SYSTEM_LIBDECOR_LDFLAGS})
endif(USE_SYSTEM_LIBDECOR)