summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLibravatar progandy <code@progandy>2015-12-20 17:37:52 +0100
committerLibravatar progandy <code@progandy>2015-12-20 17:37:52 +0100
commit21014e606b9b28d792b98cf363f20c7df2136723 (patch)
tree946a056785f05744932f21538a90f5687deb299c /CMakeLists.txt
parentUpdate README screenshot (diff)
downloadsway-21014e606b9b28d792b98cf363f20c7df2136723.tar.gz
sway-21014e606b9b28d792b98cf363f20c7df2136723.tar.zst
sway-21014e606b9b28d792b98cf363f20c7df2136723.zip
make gdk-pixbuf dependency really optional
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 18 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31e79ca4..5cd9c67b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,7 @@ option(enable-swaybg "Enables the wallpaper utility" YES)
46option(enable-swaybar "Enables the swaybar utility" YES) 46option(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)
49 50
50find_package(JsonC REQUIRED) 51find_package(JsonC REQUIRED)
51find_package(PCRE REQUIRED) 52find_package(PCRE REQUIRED)
@@ -60,6 +61,17 @@ find_package(PAM)
60include(FeatureSummary) 61include(FeatureSummary)
61include(Manpage) 62include(Manpage)
62 63
64if (enable-gdk-pixbuf)
65 if (GDK_PIXBUF_FOUND)
66 set(WITH_GDK_PIXBUF YES)
67 add_definitions(-DWITH_GDK_PIXBUF)
68 else()
69 message(WARNING "gdk-pixbuf required but not found, only png images supported.")
70 endif()
71else()
72 message(STATUS "Building without gdk-pixbuf, only png images supported.")
73endif()
74
63include_directories(include) 75include_directories(include)
64 76
65add_subdirectory(protocols) 77add_subdirectory(protocols)
@@ -68,10 +80,10 @@ add_subdirectory(wayland)
68 80
69add_subdirectory(sway) 81add_subdirectory(sway)
70if(enable-swaybg) 82if(enable-swaybg)
71 if(CAIRO_FOUND AND PANGO_FOUND AND GDK_PIXBUF_FOUND) 83 if(CAIRO_FOUND AND PANGO_FOUND)
72 add_subdirectory(swaybg) 84 add_subdirectory(swaybg)
73 else() 85 else()
74 message(WARNING "Not building swaybg - cairo, pango, and gdk-pixbuf are required.") 86 message(WARNING "Not building swaybg - cairo, and pango are required.")
75 endif() 87 endif()
76endif() 88endif()
77if(enable-swaymsg) 89if(enable-swaymsg)
@@ -81,17 +93,17 @@ if(enable-swaygrab)
81 add_subdirectory(swaygrab) 93 add_subdirectory(swaygrab)
82endif() 94endif()
83if(enable-swaybar) 95if(enable-swaybar)
84 if(CAIRO_FOUND AND PANGO_FOUND AND GDK_PIXBUF_FOUND) 96 if(CAIRO_FOUND AND PANGO_FOUND)
85 add_subdirectory(swaybar) 97 add_subdirectory(swaybar)
86 else() 98 else()
87 message(WARNING "Not building swaybar - cairo, pango, and gdk-pixbuf are required.") 99 message(WARNING "Not building swaybar - cairo, and pango are required.")
88 endif() 100 endif()
89endif() 101endif()
90if(enable-swaylock) 102if(enable-swaylock)
91 if(CAIRO_FOUND AND PANGO_FOUND AND GDK_PIXBUF_FOUND AND PAM_FOUND) 103 if(CAIRO_FOUND AND PANGO_FOUND AND PAM_FOUND)
92 add_subdirectory(swaylock) 104 add_subdirectory(swaylock)
93 else() 105 else()
94 message(WARNING "Not building swaylock - cairo, pango, gdk-pixbuf, and PAM are required.") 106 message(WARNING "Not building swaylock - cairo, pango, and PAM are required.")
95 endif() 107 endif()
96endif() 108endif()
97 109