File: 0010-Don-t-guess-include-dir-if-we-install-into-usr-inclu.patch

package info (click to toggle)
ros-catkin 0.8.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,212 kB
  • sloc: python: 4,117; sh: 508; xml: 256; cpp: 136; makefile: 125
file content (24 lines) | stat: -rw-r--r-- 1,085 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Wed, 14 Nov 2018 12:44:44 +0100
Subject: Don't guess include dir if we install into /usr/include

This would break multi arch config (like libtf2-dev) where the
assumption about the relative paths is wrong.
---
 cmake/templates/pkgConfig.cmake.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmake/templates/pkgConfig.cmake.in b/cmake/templates/pkgConfig.cmake.in
index e89238d..d91dfd5 100644
--- a/cmake/templates/pkgConfig.cmake.in
+++ b/cmake/templates/pkgConfig.cmake.in
@@ -108,6 +108,9 @@ if(NOT "@PROJECT_CMAKE_CONFIG_INCLUDE_DIRS@ " STREQUAL " ")
   foreach(idir ${_include_dirs})
     if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir})
       set(include ${idir})
+    # don't try to guess include dir if we installed into the default
+    elseif("@PROJECT_NAME_INSTALL_PREFIX@" STREQUAL "/usr")
+      continue()
     elseif("${idir} " STREQUAL "@CATKIN_GLOBAL_INCLUDE_DESTINATION@ ")
       set(include "${@PROJECT_NAME@_PREFIX}/@CATKIN_GLOBAL_INCLUDE_DESTINATION@")
       if(NOT IS_DIRECTORY ${include})