aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ed45830..c80f6361 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,7 @@ option(enable-swaybar "Enables the swaybar utility" YES)
47option(enable-swaygrab "Enables the swaygrab utility" YES) 47option(enable-swaygrab "Enables the swaygrab utility" YES)
48option(enable-swaymsg "Enables the swaymsg utility" YES) 48option(enable-swaymsg "Enables the swaymsg utility" YES)
49option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES) 49option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES)
50option(enable-tray "Enables the swaybar tray" YES)
50option(zsh-completions "Zsh shell completions" NO) 51option(zsh-completions "Zsh shell completions" NO)
51option(default-wallpaper "Installs the default wallpaper" YES) 52option(default-wallpaper "Installs the default wallpaper" YES)
52option(LD_LIBRARY_PATH "Configure sway's default LD_LIBRARY_PATH") 53option(LD_LIBRARY_PATH "Configure sway's default LD_LIBRARY_PATH")
@@ -64,9 +65,13 @@ find_package(Cairo REQUIRED)
64find_package(Pango REQUIRED) 65find_package(Pango REQUIRED)
65find_package(GdkPixbuf) 66find_package(GdkPixbuf)
66find_package(PAM) 67find_package(PAM)
68find_package(DBus)
67 69
68find_package(LibInput REQUIRED) 70find_package(LibInput REQUIRED)
69find_package(Libcap REQUIRED) 71
72if (CMAKE_SYSTEM_NAME STREQUAL Linux)
73 find_package(Libcap REQUIRED)
74endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
70 75
71if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) 76if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
72 find_package(EpollShim REQUIRED) 77 find_package(EpollShim REQUIRED)
@@ -87,6 +92,17 @@ else()
87 message(STATUS "Building without gdk-pixbuf, only png images supported.") 92 message(STATUS "Building without gdk-pixbuf, only png images supported.")
88endif() 93endif()
89 94
95if (enable-tray)
96 if (DBUS_FOUND)
97 set(ENABLE_TRAY)
98 add_definitions(-DENABLE_TRAY)
99 else()
100 message(WARNING "Tray required but DBus was not found. Tray will not be included")
101 endif()
102else()
103 message(STATUS "Building without the tray.")
104endif()
105
90include_directories(include) 106include_directories(include)
91 107
92add_subdirectory(protocols) 108add_subdirectory(protocols)