diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-27 09:33:58 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-27 09:49:21 +0300 |
commit | 3a8fa77c1fd21b9266afe549f9bd308d74439dd0 (patch) | |
tree | 7c746eaf2541da539b170757be711ae0c3245834 /build_files | |
parent | 2b6c633b63b1ed075af1f988f677b7b7cf9445b1 (diff) |
GHOST/Wayland: Add a build time option for DBUS, disable by default
Add WITH_GHOST_WAYLAND_DBUS option, so Blender can be built without
DBUS support. Currently it's only used to access the cursor theme.
Without this the "default" cursors are used instead.
Disabling this since it adds an additional dependency for a minor gain
in functionality, with the benefit of removing a library requirement.
There is also a problem where Blender hangs on startup for ~5 seconds
when DBUS isn't running. Eventually it would be good to be able to avoid
this problem without a build option.
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 781e2798fea..875305b0564 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -613,7 +613,10 @@ if(WITH_GHOST_WAYLAND) pkg_check_modules(wayland-scanner REQUIRED wayland-scanner) pkg_check_modules(xkbcommon REQUIRED xkbcommon) pkg_check_modules(wayland-cursor REQUIRED wayland-cursor) - pkg_check_modules(dbus REQUIRED dbus-1) + + if(WITH_GHOST_WAYLAND_DBUS) + pkg_check_modules(dbus REQUIRED dbus-1) + endif() if(WITH_GHOST_WAYLAND_LIBDECOR) pkg_check_modules(libdecor REQUIRED libdecor-0>=0.1) @@ -626,9 +629,15 @@ if(WITH_GHOST_WAYLAND) ${wayland-egl_LINK_LIBRARIES} ${xkbcommon_LINK_LIBRARIES} ${wayland-cursor_LINK_LIBRARIES} - ${dbus_LINK_LIBRARIES} ) + if(WITH_GHOST_WAYLAND_DBUS) + list(APPEND PLATFORM_LINKLIBS + ${dbus_LINK_LIBRARIES} + ) + add_definitions(-DWITH_GHOST_WAYLAND_DBUS) + endif() + if(WITH_GHOST_WAYLAND_LIBDECOR) list(APPEND PLATFORM_LINKLIBS ${libdecor_LIBRARIES} |