diff options
author | progandy <code@progandy> | 2015-12-20 17:37:52 +0100 |
---|---|---|
committer | progandy <code@progandy> | 2015-12-20 17:37:52 +0100 |
commit | 21014e606b9b28d792b98cf363f20c7df2136723 (patch) | |
tree | 946a056785f05744932f21538a90f5687deb299c /wayland | |
parent | Update README screenshot (diff) | |
download | sway-21014e606b9b28d792b98cf363f20c7df2136723.tar.gz sway-21014e606b9b28d792b98cf363f20c7df2136723.tar.zst sway-21014e606b9b28d792b98cf363f20c7df2136723.zip |
make gdk-pixbuf dependency really optional
Diffstat (limited to 'wayland')
-rw-r--r-- | wayland/CMakeLists.txt | 11 | ||||
-rw-r--r-- | wayland/cairo.c | 5 |
2 files changed, 13 insertions, 3 deletions
diff --git a/wayland/CMakeLists.txt b/wayland/CMakeLists.txt index 6519cd7d..282ea1aa 100644 --- a/wayland/CMakeLists.txt +++ b/wayland/CMakeLists.txt | |||
@@ -1,7 +1,6 @@ | |||
1 | include_directories( | 1 | include_directories( |
2 | ${PROTOCOLS_INCLUDE_DIRS} | 2 | ${PROTOCOLS_INCLUDE_DIRS} |
3 | ${PANGO_INCLUDE_DIRS} | 3 | ${PANGO_INCLUDE_DIRS} |
4 | ${GDK_PIXBUF_INCLUDE_DIRS} | ||
5 | ${XKBCOMMON_INCLUDE_DIRS} | 4 | ${XKBCOMMON_INCLUDE_DIRS} |
6 | ) | 5 | ) |
7 | 6 | ||
@@ -17,6 +16,14 @@ target_link_libraries(sway-wayland | |||
17 | sway-common | 16 | sway-common |
18 | sway-protocols | 17 | sway-protocols |
19 | ${PANGO_LIBRARIES} | 18 | ${PANGO_LIBRARIES} |
20 | ${GDK_PIXBUF_LIBRARIES} | ||
21 | ${XKBCOMMON_LIBRARIES} | 19 | ${XKBCOMMON_LIBRARIES} |
22 | ) | 20 | ) |
21 | |||
22 | if (WITH_GDK_PIXBUF) | ||
23 | include_directories( | ||
24 | ${GDK_PIXBUF_INCLUDE_DIRS} | ||
25 | ) | ||
26 | target_link_libraries(sway-wayland | ||
27 | ${GDK_PIXBUF_LIBRARIES} | ||
28 | ) | ||
29 | endif() | ||
diff --git a/wayland/cairo.c b/wayland/cairo.c index 10a15f40..7462b10a 100644 --- a/wayland/cairo.c +++ b/wayland/cairo.c | |||
@@ -1,7 +1,9 @@ | |||
1 | #include <gdk-pixbuf/gdk-pixbuf.h> | ||
2 | #include <cairo/cairo.h> | 1 | #include <cairo/cairo.h> |
3 | #include "client/cairo.h" | 2 | #include "client/cairo.h" |
4 | 3 | ||
4 | #ifdef WITH_GDK_PIXBUF | ||
5 | #include <gdk-pixbuf/gdk-pixbuf.h> | ||
6 | |||
5 | #ifndef GDK_PIXBUF_CHECK_VERSION | 7 | #ifndef GDK_PIXBUF_CHECK_VERSION |
6 | #define GDK_PIXBUF_CHECK_VERSION(major,minor,micro) \ | 8 | #define GDK_PIXBUF_CHECK_VERSION(major,minor,micro) \ |
7 | (GDK_PIXBUF_MAJOR > (major) || \ | 9 | (GDK_PIXBUF_MAJOR > (major) || \ |
@@ -103,3 +105,4 @@ cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf(const GdkPixbuf *gdk | |||
103 | cairo_surface_mark_dirty(cs); | 105 | cairo_surface_mark_dirty(cs); |
104 | return cs; | 106 | return cs; |
105 | } | 107 | } |
108 | #endif //WITH_GDK_PIXBUF | ||