diff options
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 @@ include_directories( ${PROTOCOLS_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} - ${GDK_PIXBUF_INCLUDE_DIRS} ${XKBCOMMON_INCLUDE_DIRS} ) @@ -17,6 +16,14 @@ target_link_libraries(sway-wayland sway-common sway-protocols ${PANGO_LIBRARIES} - ${GDK_PIXBUF_LIBRARIES} ${XKBCOMMON_LIBRARIES} ) + +if (WITH_GDK_PIXBUF) + include_directories( + ${GDK_PIXBUF_INCLUDE_DIRS} + ) + target_link_libraries(sway-wayland + ${GDK_PIXBUF_LIBRARIES} + ) +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 @@ -#include <gdk-pixbuf/gdk-pixbuf.h> #include <cairo/cairo.h> #include "client/cairo.h" +#ifdef WITH_GDK_PIXBUF +#include <gdk-pixbuf/gdk-pixbuf.h> + #ifndef GDK_PIXBUF_CHECK_VERSION #define GDK_PIXBUF_CHECK_VERSION(major,minor,micro) \ (GDK_PIXBUF_MAJOR > (major) || \ @@ -103,3 +105,4 @@ cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf(const GdkPixbuf *gdk cairo_surface_mark_dirty(cs); return cs; } +#endif //WITH_GDK_PIXBUF |