From 722e3409c7d133524750036655bf24d3193ff951 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Mon, 19 Sep 2022 19:49:55 +0200 Subject: Additional include directory given by pkg-config (#1118) * Update include example in README * Update pkg-config installed via CMake Gives the include directory to enable the use of: #include but keeps the existing include dir. for backwards compatibility. Example: > pkg-config hiredis --cflags -D_FILE_OFFSET_BITS=64 -I/usr/local/include/hiredis -I/usr/local/include * Update pkg-config installed via Make Gives the include directory to enable the use of: #include but keeps the existing include path for backwards compatibility. Example: > pkg-config hiredis --cflags -D_FILE_OFFSET_BITS=64 -I/usr/local/include/hiredis -I/usr/local/include --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b9783b7..ce1fbbb 100644 --- a/Makefile +++ b/Makefile @@ -275,20 +275,22 @@ $(PKGCONFNAME): hiredis.h @echo prefix=$(PREFIX) > $@ @echo exec_prefix=\$${prefix} >> $@ @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@ - @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@ + @echo includedir=$(PREFIX)/include >> $@ + @echo pkgincludedir=$(PREFIX)/$(INCLUDE_PATH) >> $@ @echo >> $@ @echo Name: hiredis >> $@ @echo Description: Minimalistic C client library for Redis. >> $@ @echo Version: $(HIREDIS_MAJOR).$(HIREDIS_MINOR).$(HIREDIS_PATCH) >> $@ @echo Libs: -L\$${libdir} -lhiredis >> $@ - @echo Cflags: -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@ + @echo Cflags: -I\$${pkgincludedir} -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@ $(SSL_PKGCONFNAME): hiredis_ssl.h @echo "Generating $@ for pkgconfig..." @echo prefix=$(PREFIX) > $@ @echo exec_prefix=\$${prefix} >> $@ @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@ - @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@ + @echo includedir=$(PREFIX)/include >> $@ + @echo pkgincludedir=$(PREFIX)/$(INCLUDE_PATH) >> $@ @echo >> $@ @echo Name: hiredis_ssl >> $@ @echo Description: SSL Support for hiredis. >> $@ -- cgit v1.2.3