diff options
author | 2015-12-20 11:56:13 -0500 | |
---|---|---|
committer | 2015-12-20 11:56:13 -0500 | |
commit | dfc23086fd9597a5f9c7182851052435e134be5f (patch) | |
tree | 946a056785f05744932f21538a90f5687deb299c /CMakeLists.txt | |
parent | Update README screenshot (diff) | |
parent | make gdk-pixbuf dependency really optional (diff) | |
download | sway-dfc23086fd9597a5f9c7182851052435e134be5f.tar.gz sway-dfc23086fd9597a5f9c7182851052435e134be5f.tar.zst sway-dfc23086fd9597a5f9c7182851052435e134be5f.zip |
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) | |||
46 | option(enable-swaybar "Enables the swaybar utility" YES) | 46 | option(enable-swaybar "Enables the swaybar utility" YES) |
47 | option(enable-swaygrab "Enables the swaygrab utility" YES) | 47 | option(enable-swaygrab "Enables the swaygrab utility" YES) |
48 | option(enable-swaymsg "Enables the swaymsg utility" YES) | 48 | option(enable-swaymsg "Enables the swaymsg utility" YES) |
49 | option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES) | ||
49 | 50 | ||
50 | find_package(JsonC REQUIRED) | 51 | find_package(JsonC REQUIRED) |
51 | find_package(PCRE REQUIRED) | 52 | find_package(PCRE REQUIRED) |
@@ -60,6 +61,17 @@ find_package(PAM) | |||
60 | include(FeatureSummary) | 61 | include(FeatureSummary) |
61 | include(Manpage) | 62 | include(Manpage) |
62 | 63 | ||
64 | if (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() | ||
71 | else() | ||
72 | message(STATUS "Building without gdk-pixbuf, only png images supported.") | ||
73 | endif() | ||
74 | |||
63 | include_directories(include) | 75 | include_directories(include) |
64 | 76 | ||
65 | add_subdirectory(protocols) | 77 | add_subdirectory(protocols) |
@@ -68,10 +80,10 @@ add_subdirectory(wayland) | |||
68 | 80 | ||
69 | add_subdirectory(sway) | 81 | add_subdirectory(sway) |
70 | if(enable-swaybg) | 82 | if(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() |
76 | endif() | 88 | endif() |
77 | if(enable-swaymsg) | 89 | if(enable-swaymsg) |
@@ -81,17 +93,17 @@ if(enable-swaygrab) | |||
81 | add_subdirectory(swaygrab) | 93 | add_subdirectory(swaygrab) |
82 | endif() | 94 | endif() |
83 | if(enable-swaybar) | 95 | if(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() |
89 | endif() | 101 | endif() |
90 | if(enable-swaylock) | 102 | if(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() |
96 | endif() | 108 | endif() |
97 | 109 | ||