From ce8a29362033ef63a0deb4dae58c710b73c79a3c Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Wed, 9 Jan 2019 21:04:44 +0100 Subject: [PATCH] On Windows, statically link Cairo with dependencies Pkg-config must be invoked with --static, to link other dependency libraries such as pixman. --- Makefile.base.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile.base.mk b/Makefile.base.mk index 7274bade..d481c85b 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -216,8 +216,15 @@ ifeq ($(HAVE_CAIRO),true) DGL_FLAGS += -DHAVE_CAIRO +ifneq ($(WINDOWS),true) CAIRO_FLAGS = $(shell pkg-config --cflags cairo) CAIRO_LIBS = $(shell pkg-config --libs cairo) +else +# Always build statically on windows +CAIRO_FLAGS = $(shell pkg-config --static --cflags cairo) +CAIRO_LIBS = $(shell pkg-config --static --libs cairo) +CAIRO_LIBS += -lgdi32 +endif HAVE_CAIRO_OR_OPENGL = true