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

Expand use of pkg-config variables. #1011

Merged
merged 1 commit into from
Jul 24, 2021
Merged

Conversation

eloj
Copy link
Contributor

@eloj eloj commented Jul 24, 2021

Change pkg-config generation (liblz4.pc) such that the path variables, not their values, are used in the definitions of Libs and Cflags, and that $prefix is substituted into libdir and includedir iff they start with its value.

To make the changes more clear, here's the the original output (excl. comments):

prefix=/usr/local
libdir=/usr/local/lib
includedir=/usr/local/include

Name: lz4
Description: extremely fast lossless compression algorithm library
URL: http://www.lz4.org/
Version: 1.9.3
Libs: -L/usr/local/lib -llz4
Cflags: -I/usr/local/include

The new output is:

prefix=/usr/local
libdir=${prefix}/lib
includedir=${prefix}/include

Name: lz4
Description: extremely fast lossless compression algorithm library
URL: http://www.lz4.org/
Version: 1.9.3
Libs: -L${libdir} -llz4
Cflags: -I${includedir}

@eloj eloj changed the title Use the pkgconfig variables. Expand use of pkg-config variables. Jul 24, 2021
Change pkg-config generation such that the path variables,
not their values, are used in the definitions of Libs and Cflags,
and that $prefix is substituted into libdir and includedir iff
they start with its value.

This makes it easier to modify the already installed file if necessary.
@Cyan4973
Copy link
Member

Thanks @eloj ! Great improvement !

@Cyan4973 Cyan4973 merged commit 7be5039 into lz4:dev Jul 24, 2021
@eloj eloj deleted the improve-pkgconfig branch July 24, 2021 22:45
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.

None yet

2 participants