Skip to content

Expand use of pkg-config variables.#1011

Merged
Cyan4973 merged 1 commit intolz4:devfrom
eloj:improve-pkgconfig
Jul 24, 2021
Merged

Expand use of pkg-config variables.#1011
Cyan4973 merged 1 commit intolz4:devfrom
eloj:improve-pkgconfig

Conversation

@eloj
Copy link
Copy Markdown
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 force-pushed the improve-pkgconfig branch from 6f0c456 to 0295319 Compare July 24, 2021 13:53
@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.
@eloj eloj force-pushed the improve-pkgconfig branch from 0295319 to c1f514f Compare July 24, 2021 14:06
@Cyan4973
Copy link
Copy Markdown
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.

2 participants