summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-30 21:36:19 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-30 21:36:19 +0200
commit3e2c8d5a952b6950a4cfddfb738e6e18298ba520 (patch)
treedbaf7adbb5c441fcf51def8454abe96e0c7e2953 /src
parenta2929b15baa4a9efedfbdc3eb7b46e626df4f3db (diff)
Allow building Wayland platform without dbus - cont'd (#726)
CMake-based building without dbus is made possible
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e39fea044..58c27630e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -511,9 +511,12 @@ if (FLTK_USE_X11)
endif (FLTK_USE_X11)
if (OPTION_USE_WAYLAND)
- pkg_check_modules(DBUS dbus-1)
include_directories(${DBUS_INCLUDE_DIRS})
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_CURRENT_BINARY_DIR} -fPIC -D_GNU_SOURCE -DHAS_DBUS")
+ pkg_check_modules(DBUS dbus-1)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_CURRENT_BINARY_DIR} -fPIC -D_GNU_SOURCE")
+ if (DBUS_FOUND)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAS_DBUS")
+ endif (DBUS_FOUND)
if (OPTION_USE_SYSTEM_LIBDECOR)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SYSTEM_LIBDECOR")
get_filename_component(PATH_TO_SHARED_LIBS ${HAVE_LIB_PANGO} DIRECTORY)
@@ -705,7 +708,10 @@ if (UNIX AND OPTION_USE_WAYLAND)
elseif (GTK_FOUND AND OPTION_ALLOW_GTK_PLUGIN)
list (APPEND OPTIONAL_LIBS ${GTK_LDFLAGS} )
endif (OPTION_USE_SYSTEM_LIBDECOR)
- list (APPEND OPTIONAL_LIBS "-lwayland-cursor -lwayland-client -lxkbcommon -ldl -ldbus-1")
+ list (APPEND OPTIONAL_LIBS "-lwayland-cursor -lwayland-client -lxkbcommon -ldl")
+ if (DBUS_FOUND)
+ list (APPEND OPTIONAL_LIBS "${DBUS_LDFLAGS}")
+ endif (DBUS_FOUND)
if (NOT OPTION_WAYLAND_ONLY)
list (APPEND OPTIONAL_LIBS "-lXcursor -lXrender -lXinerama -lXfixes -lXft -lXext -lX11")
endif (NOT OPTION_WAYLAND_ONLY)