Skip to content

Commit fdd8eb1

Browse files
committed
add command line flags to include "cairo.h" and link against libcairo
1 parent bdb5e38 commit fdd8eb1

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

gum/fast/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ fast.so: fast.c
77
gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing \
88
-I/usr/include/python2.5 -I/usr/include/python2.6 \
99
-I/usr/include/python2.7 \
10-
-lcairo -o fast.so fast.c
10+
`pkg-config --cflags cairo` \
11+
-o fast.so fast.c \
12+
`pkg-config --libs cairo`
1113
if [ ! -e ../fast.so ]; then ln -s fast/fast.so ../; fi
1214

1315
fast.c: fast.pyx

gum/fast/fast.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,3 @@ typedef struct {
55
void *ctx;
66
} PycairoContext;
77

8-
void cairo_move_to (void *cr, double x, double y);
9-
void cairo_line_to (void *cr, double x, double y);
10-
void cairo_rectangle(void *cr, double x, double ymin,
11-
double w, double h);
12-
void cairo_set_source_rgb (void *cr, double r, double g, double b);
13-
void cairo_stroke (void *cr);
14-
void cairo_fill (void *cr);
15-
void cairo_set_line_width(void *cr, double w);

gum/fast/fast.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ cdef extern from "math.h":
66
cdef extern from "fast.h":
77
ctypedef struct PycairoContext:
88
void *ctx
9+
10+
cdef extern from "<cairo.h>":
911
void cairo_move_to (void *cr, double x, double y) nogil
1012
void cairo_line_to (void *cr, double x, double y) nogil
1113
void cairo_rectangle(void *cr, double x, double ymin,

0 commit comments

Comments
 (0)