Skip to content

Commit 3fa6a6b

Browse files
authored
Merge pull request #2241 from kalibera/winlink-pkgconf
Use pkg-config on Windows when available.
2 parents bd1940f + 6817d34 commit 3fa6a6b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Makevars.ucrt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11

22
PKG_CPPFLAGS = \
33
-DHAVE_PROJ_H
4-
LIBSHARPYUV = $(or $(and $(wildcard $(R_TOOLS_SOFT)/lib/libsharpyuv.a),-lsharpyuv),)
5-
PKG_LIBS = \
4+
5+
ifeq (,$(shell pkg-config --version 2>/dev/null))
6+
LIBSHARPYUV = $(or $(and $(wildcard $(R_TOOLS_SOFT)/lib/libsharpyuv.a),-lsharpyuv),)
7+
PKG_LIBS = \
68
-fopenmp -lgdal -larmadillo -lopenblas -lgfortran -lquadmath -lpq -lpgcommon -lpgport -lodbc32 -lodbccp32 -lblosc -lkea -lhdf5_cpp -lhdf5 -lpoppler -llcms2 -lfreetype -lharfbuzz -lfreetype -llz4 -lpcre2-8 -lxml2 -lopenjp2 -lnetcdf -lmysqlclient -lspatialite -lgeos_c -lgeos -lminizip -lgeos -ljson-c -lgta -lfreexl -lexpat -lssl -lpsapi -lgif -lmfhdf -lhdf5_hl -lcrypto -lportablexdr -ldf -lhdf5 -lsz -lpng16 -lpng -lpoppler -llcms2 -lfreetype -lharfbuzz -lfreetype -llz4 -lpcre2-8 -lpcre -lcurl -lbcrypt -lrtmp -lssl -lssh2 -lidn2 -lunistring -liconv -lgcrypt -lcrypto -lgpg-error -lws2_32 -ltiff -llzma -ljpeg -lz -lcfitsio -lzstd -lwebpdecoder -lwebp $(LIBSHARPYUV) -lsbml-static -lgeotiff -lproj -lsqlite3 -lbz2 -lcrypt32 -lwldap32 -lsecur32
9+
else
10+
PKG_LIBS = $(shell pkg-config --libs gdal geos proj)
11+
endif
712

813
all: clean winlibs
914

0 commit comments

Comments
 (0)