Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional include directory given by pkg-config #1118

Merged
merged 3 commits into from
Sep 19, 2022

Conversation

bjosv
Copy link
Contributor

@bjosv bjosv commented Sep 19, 2022

The pkg-config installed by either Make or CMake now gives an additional include directory which
enables users to include hiredis headers with:
#include <hiredis/hiredis.h>.
The legacy path is kept for backwards compatibility.

Example before:

# pkg-config hiredis --cflags
-D_FILE_OFFSET_BITS=64 -I/usr/local/include/hiredis

Example output with PR:

# pkg-config hiredis --cflags
-D_FILE_OFFSET_BITS=64 -I/usr/local/include/hiredis -I/usr/local/include

# gcc examples/example.c $(pkg-config --cflags --libs hiredis)  # Still finds <hiredis.h>
                                                                # but also  <hiredis/hiredis.h> if example is updated.

Fixes #1044 and #627

Reference:
See commonly used spec of variable pkgincludedir.

Gives the include directory to enable the use of:
 #include <hiredis/hiredis.h>

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
Gives the include directory to enable the use of:
  #include <hiredis/hiredis.h>
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkgconfig include dir prevents redis plus plus from building
2 participants