Skip to content

Commit 9d3046a

Browse files
committed
Reintroduce library_path.sh patches from humble
1 parent b9862f0 commit 9d3046a

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/cmake/package_templates/templates_2_cmake.py b/cmake/package_templates/templates_2_cmake.py
2+
index b7c0faf..328cc38 100644
3+
--- a/cmake/package_templates/templates_2_cmake.py
4+
+++ b/cmake/package_templates/templates_2_cmake.py
5+
@@ -68,12 +68,7 @@ def generate_cmake_code():
6+
"""
7+
variables = []
8+
9+
- if not IS_WINDOWS:
10+
- variables.append((
11+
- 'ENVIRONMENT_HOOK_LIBRARY_PATH',
12+
- '"%s"' % get_environment_hook_template_path('library_path.sh')))
13+
- else:
14+
- variables.append(('ENVIRONMENT_HOOK_LIBRARY_PATH', ''))
15+
+ variables.append(('ENVIRONMENT_HOOK_LIBRARY_PATH', ''))
16+
17+
ext = '.bat.in' if IS_WINDOWS else '.sh.in'
18+
variables.append((
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/ament_package/template/environment_hook/library_path.sh b/ament_package/template/environment_hook/library_path.sh
2+
deleted file mode 100644
3+
index 292e518..0000000
4+
--- a/ament_package/template/environment_hook/library_path.sh
5+
+++ /dev/null
6+
@@ -1,16 +0,0 @@
7+
-# copied from ament_package/template/environment_hook/library_path.sh
8+
-
9+
-# detect if running on Darwin platform
10+
-_UNAME=`uname -s`
11+
-_IS_DARWIN=0
12+
-if [ "$_UNAME" = "Darwin" ]; then
13+
- _IS_DARWIN=1
14+
-fi
15+
-unset _UNAME
16+
-
17+
-if [ $_IS_DARWIN -eq 0 ]; then
18+
- ament_prepend_unique_value LD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib"
19+
-else
20+
- ament_prepend_unique_value DYLD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib"
21+
-fi
22+
-unset _IS_DARWIN

0 commit comments

Comments
 (0)