Avoid double slashes in paths created by pkg-config

If in a .pc variable a path is created from another
variable, such as exec_prefix=${prefix}/lib, prefix
must not contain a trailing slash to avoid double
slashes in the generated path.
This commit is contained in:
Ralf Habacker 2018-10-26 15:12:29 +02:00 committed by Simon McVittie
parent 9983744326
commit 696a6b629d
2 changed files with 2 additions and 2 deletions

View file

@ -671,7 +671,7 @@ if(UNIX)
endforeach()
set(original_prefix "${CMAKE_INSTALL_PREFIX}")
if(DBUS_RELOCATABLE)
set(pkgconfig_prefix "\${pcfiledir}/../../")
set(pkgconfig_prefix "\${pcfiledir}/../..")
else()
set(pkgconfig_prefix "\${original_prefix}")
endif()

View file

@ -1584,7 +1584,7 @@ AS_IF([test "x$enable_relocation" = xauto],
AS_IF([test "x$enable_relocation" = xyes],
[AC_SUBST([pkgconfig_prefix], ['${pcfiledir}/../../'])],
[AC_SUBST([pkgconfig_prefix], ['${pcfiledir}/../..'])],
[AC_SUBST([pkgconfig_prefix], ['${original_prefix}'])])
#### Directory to source sysconfdir configuration from