mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
[swaybar] fix non-dbus build
Swaybar's CMakeLists.txt uses the enable-tray option directly to decide whether to build the tray. This leads to a compilation error if dbus is not installed. This patch uses the ENABLE_TRAY variable instead, which is only true if the user enabled the tray *and* dbus is available.
This commit is contained in:
parent
1e13a1fd60
commit
8976a47f62
|
@ -95,7 +95,7 @@ endif()
|
||||||
|
|
||||||
if (enable-tray)
|
if (enable-tray)
|
||||||
if (DBUS_FOUND)
|
if (DBUS_FOUND)
|
||||||
set(ENABLE_TRAY)
|
set(ENABLE_TRAY TRUE)
|
||||||
add_definitions(-DENABLE_TRAY)
|
add_definitions(-DENABLE_TRAY)
|
||||||
else()
|
else()
|
||||||
message(WARNING "Tray required but DBus was not found. Tray will not be included")
|
message(WARNING "Tray required but DBus was not found. Tray will not be included")
|
||||||
|
|
|
@ -7,7 +7,7 @@ include_directories(
|
||||||
${XKBCOMMON_INCLUDE_DIRS}
|
${XKBCOMMON_INCLUDE_DIRS}
|
||||||
${DBUS_INCLUDE_DIRS}
|
${DBUS_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
if (enable-tray)
|
if (ENABLE_TRAY)
|
||||||
file(GLOB tray
|
file(GLOB tray
|
||||||
tray/*.c
|
tray/*.c
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue