Skip to content

Commit

Permalink
Correcly use ${prefix} variable in generated pkg-config (#1037)
Browse files Browse the repository at this point in the history
When generating the package files for the install space, correctly use
${prefix} instead of repeating the package root dir.
  • Loading branch information
Hugal31 authored and dirk-thomas committed Nov 11, 2019
1 parent 51a25e2 commit f742988
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/catkin_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ function(_catkin_package)
set(INSTALLSPACE TRUE)

set(PROJECT_SPACE_DIR ${CMAKE_INSTALL_PREFIX})
set(PKG_INCLUDE_PREFIX ${PROJECT_SPACE_DIR})
set(PKG_INCLUDE_PREFIX "\\\${prefix}")

# absolute path to include dir under install prefix if any include dir is set
set(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS "")
Expand Down
2 changes: 1 addition & 1 deletion cmake/em/pkg.pc.em
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Name: @(CATKIN_PACKAGE_PREFIX + PROJECT_NAME)
Description: Description of @PROJECT_NAME
Version: @PROJECT_VERSION
Cflags: @(' '.join(['-I%s' % include for include in PROJECT_PKG_CONFIG_INCLUDE_DIRS]))
Libs: -L@PROJECT_SPACE_DIR/lib @(' '.join(PKG_CONFIG_LIBRARIES_WITH_PREFIX))
Libs: -L${prefix}/lib @(' '.join(PKG_CONFIG_LIBRARIES_WITH_PREFIX))
Requires: @(PROJECT_CATKIN_DEPENDS)

0 comments on commit f742988

Please sign in to comment.