summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2009-12-14 00:56:15 +0100
committerPino Toscano <pino@kde.org>2009-12-14 00:56:15 +0100
commitb3f5e5d60bc9109da961940f6216722f9db4a87b (patch)
tree8f725ddbd3292da733412be42b5b2a4707f31d0f /cmake
parentf6ba877e0c22538cfe34d32d69814f660de59d2c (diff)
[CMake] add the configure check for the Cairo blend modes support (as in autotools)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindCairo.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/modules/FindCairo.cmake b/cmake/modules/FindCairo.cmake
index a0a8400d..ccf82080 100644
--- a/cmake/modules/FindCairo.cmake
+++ b/cmake/modules/FindCairo.cmake
@@ -37,6 +37,24 @@ if (NOT WIN32)
endif(NOT WIN32)
+if (CAIRO_FOUND)
+ include(MacroPushRequiredVars)
+ include(CheckCSourceCompiles)
+
+ macro_push_required_vars()
+ set(CMAKE_REQUIRED_DEFINITIONS ${CAIRO_CFLAGS})
+ set(CMAKE_REQUIRED_LIBRARIES ${CAIRO_LIBRARIES})
+ check_c_source_compiles("
+#include <cairo.h>
+int main() {
+ cairo_t *cr;
+ cairo_set_operator(cr, CAIRO_OPERATOR_MULTIPLY);
+ return 0;
+}
+" CAIRO_HAS_BLEND_MODES)
+ macro_pop_required_vars()
+endif (CAIRO_FOUND)
+
mark_as_advanced(
CAIRO_CFLAGS
CAIRO_LIBRARIES