From 19fb6ff4779ff8c116ee5102b2e28a08c3f8b5d1 Mon Sep 17 00:00:00 2001 From: Tomas Kalibera Date: Tue, 10 Oct 2023 19:01:09 +0200 Subject: [PATCH] Use pkg-config on Windows when available. Also fix linking for previous Rtools43. --- src/Makevars.ucrt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Makevars.ucrt b/src/Makevars.ucrt index 8b92273..f61647a 100644 --- a/src/Makevars.ucrt +++ b/src/Makevars.ucrt @@ -1,4 +1,9 @@ -PKG_LIBS = -ltiff -ljpeg -lz -lzstd -lwebp -llzma +ifeq (,$(shell pkg-config --version 2>/dev/null)) + LIBSHARPYUV = $(or $(and $(wildcard $(R_TOOLS_SOFT)/lib/libsharpyuv.a),-lsharpyuv),) + PKG_LIBS = -ltiff -ljpeg -lz -lzstd -lwebp $(LIBSHARPYUV) -llzma +else + PKG_LIBS = $(shell pkg-config --libs libtiff-4) +endif all: clean