diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-12-20 11:56:13 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-12-20 11:56:13 -0500 |
commit | dfc23086fd9597a5f9c7182851052435e134be5f (patch) | |
tree | 946a056785f05744932f21538a90f5687deb299c /CMakeLists.txt | |
parent | 66554698a08e8c3846d22f61445c880c9de20e26 (diff) | |
parent | 21014e606b9b28d792b98cf363f20c7df2136723 (diff) |
Merge pull request #377 from progandy/optional-pixbuf
make gdk-pixbuf dependency really optional
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 24 |
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) option(enable-swaybar "Enables the swaybar utility" YES) option(enable-swaygrab "Enables the swaygrab utility" YES) option(enable-swaymsg "Enables the swaymsg utility" YES) +option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES) find_package(JsonC REQUIRED) find_package(PCRE REQUIRED) @@ -60,6 +61,17 @@ find_package(PAM) include(FeatureSummary) include(Manpage) +if (enable-gdk-pixbuf) + if (GDK_PIXBUF_FOUND) + set(WITH_GDK_PIXBUF YES) + add_definitions(-DWITH_GDK_PIXBUF) + else() + message(WARNING "gdk-pixbuf required but not found, only png images supported.") + endif() +else() + message(STATUS "Building without gdk-pixbuf, only png images supported.") +endif() + include_directories(include) add_subdirectory(protocols) @@ -68,10 +80,10 @@ add_subdirectory(wayland) add_subdirectory(sway) if(enable-swaybg) - if(CAIRO_FOUND AND PANGO_FOUND AND GDK_PIXBUF_FOUND) + if(CAIRO_FOUND AND PANGO_FOUND) add_subdirectory(swaybg) else() - message(WARNING "Not building swaybg - cairo, pango, and gdk-pixbuf are required.") + message(WARNING "Not building swaybg - cairo, and pango are required.") endif() endif() if(enable-swaymsg) @@ -81,17 +93,17 @@ if(enable-swaygrab) add_subdirectory(swaygrab) endif() if(enable-swaybar) - if(CAIRO_FOUND AND PANGO_FOUND AND GDK_PIXBUF_FOUND) + if(CAIRO_FOUND AND PANGO_FOUND) add_subdirectory(swaybar) else() - message(WARNING "Not building swaybar - cairo, pango, and gdk-pixbuf are required.") + message(WARNING "Not building swaybar - cairo, and pango are required.") endif() endif() if(enable-swaylock) - if(CAIRO_FOUND AND PANGO_FOUND AND GDK_PIXBUF_FOUND AND PAM_FOUND) + if(CAIRO_FOUND AND PANGO_FOUND AND PAM_FOUND) add_subdirectory(swaylock) else() - message(WARNING "Not building swaylock - cairo, pango, gdk-pixbuf, and PAM are required.") + message(WARNING "Not building swaylock - cairo, pango, and PAM are required.") endif() endif() |