aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tobias Blass <tobiasblass@t-online.de>2017-07-20 22:14:32 +0200
committerLibravatar Tobias Blass <tobiasblass@t-online.de>2017-07-20 23:03:16 +0200
commit8976a47f629dd2af65c6fabaff736e13d80a270b (patch)
treef069574851afa50bff3d8edeabe8f9790352faab
parentMerge pull request #1283 from 4e554c4c/memory_leak (diff)
downloadsway-8976a47f629dd2af65c6fabaff736e13d80a270b.tar.gz
sway-8976a47f629dd2af65c6fabaff736e13d80a270b.tar.zst
sway-8976a47f629dd2af65c6fabaff736e13d80a270b.zip
[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.
-rw-r--r--CMakeLists.txt2
-rw-r--r--swaybar/CMakeLists.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4bf351b..459eeb04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -95,7 +95,7 @@ endif()
95 95
96if (enable-tray) 96if (enable-tray)
97 if (DBUS_FOUND) 97 if (DBUS_FOUND)
98 set(ENABLE_TRAY) 98 set(ENABLE_TRAY TRUE)
99 add_definitions(-DENABLE_TRAY) 99 add_definitions(-DENABLE_TRAY)
100 else() 100 else()
101 message(WARNING "Tray required but DBus was not found. Tray will not be included") 101 message(WARNING "Tray required but DBus was not found. Tray will not be included")
diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt
index 373719de..48ededdd 100644
--- a/swaybar/CMakeLists.txt
+++ b/swaybar/CMakeLists.txt
@@ -7,7 +7,7 @@ include_directories(
7 ${XKBCOMMON_INCLUDE_DIRS} 7 ${XKBCOMMON_INCLUDE_DIRS}
8 ${DBUS_INCLUDE_DIRS} 8 ${DBUS_INCLUDE_DIRS}
9) 9)
10if (enable-tray) 10if (ENABLE_TRAY)
11 file(GLOB tray 11 file(GLOB tray
12 tray/*.c 12 tray/*.c
13 ) 13 )