Skip to content

Commit

Permalink
Update linking on Windows for upcoming version of Rtools. Use pkg-con…
Browse files Browse the repository at this point in the history
…fig when available.
  • Loading branch information
kalibera committed Feb 23, 2024
1 parent 4c1e0c5 commit 28c9c66
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
HTSLIB_DIR=htslib-1.18
PKG_CPPFLAGS=-I. -I${HTSLIB_DIR} -D_FILE_OFFSET_BITS=64
PKG_LIBS=${HTSLIB_DIR}/libhts.a -lm -lbz2 -llzma -lcurl -lbcrypt -lidn2 -lunistring -liconv -lssl -lcrypto -lcrypt32 -lwsock32 -lwldap32 -lssh2 -lgcrypt -lgpg-error -lws2_32 -lzstd -lregex -lz
PKG_LIBS=${HTSLIB_DIR}/libhts.a

ifeq (,$(shell pkg-config --version 2>/dev/null))
LIBPSL = $(or $(and $(wildcard $(R_TOOLS_SOFT)/lib/libpsl.a),-lpsl),)
LIBBROTLI = $(or $(and $(wildcard $(R_TOOLS_SOFT)/lib/libbrotlidec.a),-lbrotlidec -lbrotlicommon),)
PKG_LIBS += ${HTSLIB_DIR}/libhts.a -lm -lbz2 -llzma -lcurl $(LIBPSL) $(LIBBROTLI) -lbcrypt -lidn2 -lunistring -liconv -lssl -lcrypto -lcrypt32 -lwsock32 -lwldap32 -lssh2 -lgcrypt -lgpg-error -lws2_32 -lzstd -lregex -lz
else
PKG_LIBS += -llzma -lbz2 -lregex $(shell pkg-config --libs libcurl)
PKG_CPPFLAGS += $(shell pkg-config --cflags libcurl)
endif

.PHONY: all clean HTSLIB

Expand Down

0 comments on commit 28c9c66

Please sign in to comment.