From 74a8100804c8f18e1e2a71435b1e191df49e81fd Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 17 Nov 2017 14:44:51 +0100 Subject: Fix build if lcms2 is not present. We NEED lcms2art (the artifex branch) and cannot build with stock lcms2. Disable ICC support if the lcms2 thirdparty library is not present. --- Makerules | 5 ----- Makethird | 3 +-- source/fitz/color-lcms.c | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makerules b/Makerules index fc1375d2..5b475a9f 100644 --- a/Makerules +++ b/Makerules @@ -136,11 +136,6 @@ SYS_OPENJPEG_CFLAGS := $(shell pkg-config --cflags libopenjp2) SYS_OPENJPEG_LIBS := $(shell pkg-config --libs libopenjp2) endif -ifeq "$(shell pkg-config --exists lcms2 && echo yes)" "yes" -SYS_LCMS2_CFLAGS := $(shell pkg-config --cflags lcms2) -SYS_LCMS2_LIBS := $(shell pkg-config --libs lcms2) -endif - SYS_JBIG2DEC_LIBS := -ljbig2dec SYS_LIBJPEG_LIBS := -ljpeg SYS_ZLIB_LIBS := -lz diff --git a/Makethird b/Makethird index 38d6d7cf..53ad3ba7 100644 --- a/Makethird +++ b/Makethird @@ -575,8 +575,7 @@ $(LCMS2_OUT)/%.o: $(LCMS2_DIR)/src/%.c | $(LCMS2_OUT) LCMS2_CFLAGS := -I$(LCMS2_DIR)/include else -LCMS2_CFLAGS := $(SYS_LCMS2_CFLAGS) -LCMS2_LIBS := $(SYS_LCMS2_LIBS) +LCMS2_CFLAGS := -DNO_ICC endif # --- cURL --- diff --git a/source/fitz/color-lcms.c b/source/fitz/color-lcms.c index 604573cb..93a5e415 100644 --- a/source/fitz/color-lcms.c +++ b/source/fitz/color-lcms.c @@ -1,4 +1,6 @@ #include "mupdf/fitz.h" + +#ifndef NO_ICC #include "lcms2art.h" #include "lcms2art_plugin.h" #include "colorspace-imp.h" @@ -356,3 +358,4 @@ fz_cmm_engine fz_cmm_engine_lcms = { fz_lcms_fin_profile, cmsFLAGS_NOWHITEONWHITEFIXUP }; +#endif -- cgit v1.2.3