<commit_before>From 2cb85fa4b189ea62bc918a5fc54bb6ba73a6e125 Mon Sep 17 00:00:00 2001
From: <NAME> <<EMAIL>>
Date: Thu, 19 Feb 2015 08:18:03 +0100
Subject: [PATCH] link only libraries found with find_package

When cross-compiling dwa_local_planner with the OpenEmbedded layer
for ROS, meta-ros [1], I stumbled over the following issue. During
'Linking CXX shared library devel/lib/libdwa_local_planner.so', the
g++ call for this linking step includes amongst many other arguments
these two arguments in this order:

  -lbase_local_planner /[...]/sysroots/qemux86/opt/ros/hydro/lib/libbase_local_planner.so

In the meta-ros setup, the linker aborts with:
  .../sysroots/x86_64-linux/usr/libexec/i586-oe-linux/gcc/i586-oe-linux/4.9.1/ld: cannot find -lbase_local_planner

The linking fails, because in the cross-compiling scenario,
-lbase_local_planner is not resolved. However, cmake and the
find_package command is set up such that the pathes are resolved
correctly in this setting. To use these correct pathes, the
link_target_libraries should not hard-code the library name, but
only use the libraries found with find_package.

Probably, this has not been noticed before, as in the common setup,
find_package resolved to the hard-coded value.

[1] https://github.com/bmwcarit/meta-ros/

Signed-off-by: <NAME> <<EMAIL>>

Upstream-Status: Submitted [https://github.com/ros-planning/navigation/pull/311]
---
 dwa_local_planner/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dwa_local_planner/CMakeLists.txt b/dwa_local_planner/CMakeLists.txt
index e68286e..6e9a11a 100644
--- a/dwa_local_planner/CMakeLists.txt
+++ b/dwa_local_planner/CMakeLists.txt
@@ -42,7 +42,7 @@ catkin_package(
 )
 
 add_library(dwa_local_planner src/dwa_planner.cpp src/dwa_planner_ros.cpp)
-target_link_libraries(dwa_local_planner base_local_planner ${catkin_LIBRARIES})
+target_link_libraries(dwa_local_planner ${catkin_LIBRARIES})
 add_dependencies(dwa_local_planner dwa_local_planner_gencfg)
 add_dependencies(dwa_local_planner nav_msgs_gencpp)
 <commit_msg>dwa-local-planner: updating patch's upstream status<commit_after>From 2cb85fa4b189ea62bc918a5fc54bb6ba73a6e125 Mon Sep 17 00:00:00 2001
From: <NAME> <<EMAIL>>
Date: Thu, 19 Feb 2015 08:18:03 +0100
Subject: [PATCH] link only libraries found with find_package

When cross-compiling dwa_local_planner with the OpenEmbedded layer
for ROS, meta-ros [1], I stumbled over the following issue. During
'Linking CXX shared library devel/lib/libdwa_local_planner.so', the
g++ call for this linking step includes amongst many other arguments
these two arguments in this order:

  -lbase_local_planner /[...]/sysroots/qemux86/opt/ros/hydro/lib/libbase_local_planner.so

In the meta-ros setup, the linker aborts with:
  .../sysroots/x86_64-linux/usr/libexec/i586-oe-linux/gcc/i586-oe-linux/4.9.1/ld: cannot find -lbase_local_planner

The linking fails, because in the cross-compiling scenario,
-lbase_local_planner is not resolved. However, cmake and the
find_package command is set up such that the pathes are resolved
correctly in this setting. To use these correct pathes, the
link_target_libraries should not hard-code the library name, but
only use the libraries found with find_package.

Probably, this has not been noticed before, as in the common setup,
find_package resolved to the hard-coded value.

[1] https://github.com/bmwcarit/meta-ros/

Signed-off-by: <NAME> <<EMAIL>>

Upstream-Status: Accepted [in indigo-devel branch]
---
 dwa_local_planner/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dwa_local_planner/CMakeLists.txt b/dwa_local_planner/CMakeLists.txt
index e68286e..6e9a11a 100644
--- a/dwa_local_planner/CMakeLists.txt
+++ b/dwa_local_planner/CMakeLists.txt
@@ -42,7 +42,7 @@ catkin_package(
 )
 
 add_library(dwa_local_planner src/dwa_planner.cpp src/dwa_planner_ros.cpp)
-target_link_libraries(dwa_local_planner base_local_planner ${catkin_LIBRARIES})
+target_link_libraries(dwa_local_planner ${catkin_LIBRARIES})
 add_dependencies(dwa_local_planner dwa_local_planner_gencfg)
 add_dependencies(dwa_local_planner nav_msgs_gencpp)
 
{'fraction_non_alphanumeric': 0.09204819277108434, 'fraction_numerical': 0.04506024096385542, 'mean_word_length': 5.4859375, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7254968', 'n_tokens_mistral': 1629, 'n_tokens_neox': 1449, 'n_words': 390}