cmake: Fix pkgconfig path relocation in mingw

This fixes patch relocation of the output of pkgconfig by adding
missing keywords like prefix, exec_prefix, libdir and includedir.
The pkgconfig output changes are like following:

* Before:
$ pkg-config -libs libssh
-lssh

* After:
$ pkg-config -libs libssh
-LF:/msys64/ucrt64/lib -lssh

See https://people.freedesktop.org/~dbn/pkg-config-guide.html for
further documentation.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Biswapriyo Nath
2022-09-14 21:55:40 +05:30
committed by Jakub Jelen
parent 26895498fb
commit 425353d986
2 changed files with 10 additions and 6 deletions

View File

@@ -1,6 +1,10 @@
Name: ${PROJECT_NAME}
Description: The SSH Library
Version: ${PROJECT_VERSION}
Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -lssh
Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR}
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: @PROJECT_NAME@
Description: The SSH Library
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lssh
Cflags: -I${includedir}