File: 0003-Add-usr-as-implicit-AMENT_PREFIX_PATH.patch

package info (click to toggle)
ros2-ament-cmake 2.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,624 kB
  • sloc: python: 697; xml: 503; cpp: 144; ansic: 84; sh: 8; makefile: 5
file content (23 lines) | stat: -rw-r--r-- 984 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Fri, 6 May 2022 14:48:22 +0200
Subject: Add /usr as implicit AMENT_PREFIX_PATH

Forwarded: not-needed
---
 ament_cmake_core/cmake/index/ament_index_get_prefix_path.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ament_cmake_core/cmake/index/ament_index_get_prefix_path.cmake b/ament_cmake_core/cmake/index/ament_index_get_prefix_path.cmake
index c3e1dc7..43c81de 100644
--- a/ament_cmake_core/cmake/index/ament_index_get_prefix_path.cmake
+++ b/ament_cmake_core/cmake/index/ament_index_get_prefix_path.cmake
@@ -39,6 +39,9 @@ function(ament_index_get_prefix_path var)
       # Convert it to a list if not on Windows.
       # On Windows, it is already separated by ; and is a list in CMake.
       string(REPLACE ":" ";" prefix_path "${prefix_path}")
+      if(NOT "$ENV{AMENT_PREFIX_NO_IMPLICIT_USR}")
+        list(APPEND prefix_path "/usr")
+      endif()
     endif()
   else()
     set(prefix_path "")