Add build option FLTK_USE_DBUS to allow build w/o dbus (PR #1252)
Thanks to @lanodan for most of the source code.
This commit is contained in:
parent
85be70efa5
commit
b371c1185c
@ -320,6 +320,7 @@ if(UNIX)
|
|||||||
endif()
|
endif()
|
||||||
unset(FLTK_GRAPHICS_CAIRO CACHE)
|
unset(FLTK_GRAPHICS_CAIRO CACHE)
|
||||||
set(FLTK_GRAPHICS_CAIRO TRUE CACHE BOOL "all drawing to X11 windows uses Cairo")
|
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)
|
option(FLTK_USE_SYSTEM_LIBDECOR "use libdecor from the system" ON)
|
||||||
set(USE_SYSTEM_LIBDECOR 1)
|
set(USE_SYSTEM_LIBDECOR 1)
|
||||||
unset(FLTK_USE_XRENDER CACHE)
|
unset(FLTK_USE_XRENDER CACHE)
|
||||||
|
|||||||
@ -44,9 +44,12 @@ if(WIN32)
|
|||||||
elseif(APPLE AND NOT FLTK_BACKEND_X11)
|
elseif(APPLE AND NOT FLTK_BACKEND_X11)
|
||||||
list(APPEND FLTK_LDLIBS ${FLTK_COCOA_FRAMEWORKS})
|
list(APPEND FLTK_LDLIBS ${FLTK_COCOA_FRAMEWORKS})
|
||||||
elseif(FLTK_USE_WAYLAND)
|
elseif(FLTK_USE_WAYLAND)
|
||||||
foreach(_lib WLDCURSOR WLDCLIENT XKBCOMMON DBUS)
|
foreach(_lib WLDCURSOR WLDCLIENT XKBCOMMON)
|
||||||
list(APPEND FLTK_LDLIBS "${${_lib}_LDFLAGS}")
|
list(APPEND FLTK_LDLIBS "${${_lib}_LDFLAGS}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
if(FLTK_USE_DBUS AND DBUS_FOUND)
|
||||||
|
list(APPEND FLTK_LDLIBS "${DBUS_LDFLAGS}")
|
||||||
|
endif()
|
||||||
if(USE_SYSTEM_LIBDECOR)
|
if(USE_SYSTEM_LIBDECOR)
|
||||||
list(APPEND FLTK_LDLIBS ${SYSTEM_LIBDECOR_LDFLAGS})
|
list(APPEND FLTK_LDLIBS ${SYSTEM_LIBDECOR_LDFLAGS})
|
||||||
endif(USE_SYSTEM_LIBDECOR)
|
endif(USE_SYSTEM_LIBDECOR)
|
||||||
|
|||||||
@ -411,6 +411,7 @@ if(FLTK_USE_WAYLAND)
|
|||||||
else()
|
else()
|
||||||
fl_summary("" "Libdecor = Bundled")
|
fl_summary("" "Libdecor = Bundled")
|
||||||
endif()
|
endif()
|
||||||
|
fl_summary_yn("Use DBUS" DBUS_FOUND)
|
||||||
endif(FLTK_USE_WAYLAND)
|
endif(FLTK_USE_WAYLAND)
|
||||||
|
|
||||||
message("")
|
message("")
|
||||||
|
|||||||
@ -288,6 +288,9 @@ FLTK_OPTION_SVG - default ON
|
|||||||
FLTK has a built-in SVG library and can create (write) SVG image files.
|
FLTK has a built-in SVG library and can create (write) SVG image files.
|
||||||
Turning this option off disables SVG (read and write) support.
|
Turning this option off disables SVG (read and write) support.
|
||||||
|
|
||||||
|
FLTK_USE_DBUS - default ON (Wayland only).
|
||||||
|
Meaningful only under Wayland. Allows FLTK to detect the current cursor theme.
|
||||||
|
|
||||||
FLTK_USE_LIBDECOR_GTK - default ON (Wayland only).
|
FLTK_USE_LIBDECOR_GTK - default ON (Wayland only).
|
||||||
Meaningful only under Wayland and if FLTK_USE_SYSTEM_LIBDECOR is 'OFF'.
|
Meaningful only under Wayland and if FLTK_USE_SYSTEM_LIBDECOR is 'OFF'.
|
||||||
Allows to use libdecor's GTK plugin to draw window titlebars. Otherwise
|
Allows to use libdecor's GTK plugin to draw window titlebars. Otherwise
|
||||||
|
|||||||
@ -532,14 +532,16 @@ if(FLTK_USE_X11)
|
|||||||
endif(FLTK_USE_X11)
|
endif(FLTK_USE_X11)
|
||||||
|
|
||||||
if(FLTK_USE_WAYLAND)
|
if(FLTK_USE_WAYLAND)
|
||||||
pkg_check_modules(DBUS IMPORTED_TARGET dbus-1)
|
|
||||||
set(IDIRS "${CMAKE_CURRENT_BINARY_DIR}")
|
set(IDIRS "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
set(CDEFS "_GNU_SOURCE;HAVE_MEMFD_CREATE;HAVE_MKOSTEMP;HAVE_POSIX_FALLOCATE")
|
set(CDEFS "_GNU_SOURCE;HAVE_MEMFD_CREATE;HAVE_MKOSTEMP;HAVE_POSIX_FALLOCATE")
|
||||||
set(COPTS "-fPIC")
|
set(COPTS "-fPIC")
|
||||||
|
if(FLTK_USE_DBUS)
|
||||||
|
pkg_check_modules(DBUS IMPORTED_TARGET dbus-1)
|
||||||
if(DBUS_FOUND)
|
if(DBUS_FOUND)
|
||||||
set(CDEFS "${CDEFS};HAS_DBUS")
|
set(CDEFS "${CDEFS};HAS_DBUS")
|
||||||
set(IDIRS "${IDIRS};${DBUS_INCLUDE_DIRS}")
|
set(IDIRS "${IDIRS};${DBUS_INCLUDE_DIRS}")
|
||||||
endif(DBUS_FOUND)
|
endif(DBUS_FOUND)
|
||||||
|
endif(FLTK_USE_DBUS)
|
||||||
if(USE_SYSTEM_LIBDECOR)
|
if(USE_SYSTEM_LIBDECOR)
|
||||||
set(CDEFS "${CDEFS};USE_SYSTEM_LIBDECOR;LIBDECOR_PLUGIN_DIR=${LIBDECOR_PLUGIN_DIR}")
|
set(CDEFS "${CDEFS};USE_SYSTEM_LIBDECOR;LIBDECOR_PLUGIN_DIR=${LIBDECOR_PLUGIN_DIR}")
|
||||||
if(GTK_FOUND)
|
if(GTK_FOUND)
|
||||||
@ -809,7 +811,7 @@ if(UNIX AND FLTK_USE_WAYLAND)
|
|||||||
|
|
||||||
append_optional_libs("PkgConfig::WLDCURSOR;PkgConfig::WLDCLIENT;PkgConfig::XKBCOMMON")
|
append_optional_libs("PkgConfig::WLDCURSOR;PkgConfig::WLDCLIENT;PkgConfig::XKBCOMMON")
|
||||||
|
|
||||||
if(DBUS_FOUND)
|
if(FLTK_USE_DBUS AND DBUS_FOUND)
|
||||||
append_optional_libs(PkgConfig::DBUS)
|
append_optional_libs(PkgConfig::DBUS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user