Skip to content

Commit

Permalink
build(CMake): Fix pkg-config directory specification
Browse files Browse the repository at this point in the history
- Properly add the install prefix to the libdir and includedir.
- Define the prefix once.
- Quote paths which may contain whitespace.
  • Loading branch information
BurningEnlightenment authored and oconnor663 committed Jun 17, 2023
1 parent 65733a7 commit 072bef5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions c/libblake3.pc.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@
prefix="@CMAKE_INSTALL_PREFIX@"
exec_prefix="${prefix}"
libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@"
includedir="${prefix}/@CMAKE_INSTALL_INCLUDEDIR@"

Name: @PROJECT_NAME@
Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@

Requires:
Libs: -L${libdir} -lblake3
Cflags: -I${includedir} @BLAKE3_PKGCONFIG_CFLAGS@
Libs: -L"${libdir}" -lblake3
Cflags: -I"${includedir}" @BLAKE3_PKGCONFIG_CFLAGS@

0 comments on commit 072bef5

Please sign in to comment.