GHOST/Wayland: add build option to set the XDG app-id
Add WITH_GHOST_WAYLAND_APP_ID so people making custom builds may differentiate the blender instance by version/branch etc.
This commit is contained in:
parent
d1a5f24e73
commit
64a114d11c
@ -257,6 +257,12 @@ if(UNIX AND NOT (APPLE OR HAIKU))
|
||||
|
||||
option(WITH_GHOST_WAYLAND_DYNLOAD "Enable runtime dynamic WAYLAND libraries loading" ON)
|
||||
mark_as_advanced(WITH_GHOST_WAYLAND_DYNLOAD)
|
||||
|
||||
set(WITH_GHOST_WAYLAND_APP_ID "" CACHE STRING "\
|
||||
The application ID used for Blender (use default when an empty string), \
|
||||
this can be used to differentiate Blender instances by version or branch for example."
|
||||
)
|
||||
mark_as_advanced(WITH_GHOST_WAYLAND_APP_ID)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -393,6 +393,11 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
|
||||
unset(INC_DST)
|
||||
|
||||
add_definitions(-DWITH_GHOST_WAYLAND)
|
||||
|
||||
if(NOT WITH_GHOST_WAYLAND_APP_ID STREQUAL "")
|
||||
add_definitions(-DWITH_GHOST_WAYLAND_APP_ID=${WITH_GHOST_WAYLAND_APP_ID})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_INPUT_NDOF)
|
||||
|
@ -823,7 +823,13 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
|
||||
* simply called `blender.desktop`, so the it's important to follow that name.
|
||||
* Other distributions such as SNAP & FLATPAK may need to change this value T101779.
|
||||
* Currently there isn't a way to configure this, we may want to support that. */
|
||||
const char *xdg_app_id = "blender";
|
||||
const char *xdg_app_id = (
|
||||
#ifdef WITH_GHOST_WAYLAND_APP_ID
|
||||
STRINGIFY(WITH_GHOST_WAYLAND_APP_ID)
|
||||
#else
|
||||
"blender"
|
||||
#endif
|
||||
);
|
||||
|
||||
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
|
||||
if (use_libdecor) {
|
||||
|
Loading…
Reference in New Issue
Block a user