Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions pluginlib/include/pluginlib/class_loader_imp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,6 @@ const std::string os_pathsep(";"); // NOLINT
const std::string os_pathsep(":"); // NOLINT
#endif

namespace
{
std::vector<std::string> catkinFindLib()
{
std::vector<std::string> lib_paths;
const char * env = std::getenv("CMAKE_PREFIX_PATH");
if (env) {
std::string env_catkin_prefix_paths(env);
std::vector<std::string> catkin_prefix_paths;
boost::split(catkin_prefix_paths, env_catkin_prefix_paths, boost::is_any_of(os_pathsep));
BOOST_FOREACH(std::string catkin_prefix_path, catkin_prefix_paths) {
boost::filesystem::path path(catkin_prefix_path);
boost::filesystem::path lib("lib");
lib_paths.push_back((path / lib).string());
}
}
return lib_paths;
}

} // namespace

namespace pluginlib
{
template<class T>
Expand Down Expand Up @@ -323,7 +302,19 @@ template<class T>
std::vector<std::string> ClassLoader<T>::getCatkinLibraryPaths()
/***************************************************************************/
{
return catkinFindLib();
std::vector<std::string> lib_paths;
const char * env = std::getenv("CMAKE_PREFIX_PATH");
if (env) {
std::string env_catkin_prefix_paths(env);
std::vector<std::string> catkin_prefix_paths;
boost::split(catkin_prefix_paths, env_catkin_prefix_paths, boost::is_any_of(os_pathsep));
BOOST_FOREACH(std::string catkin_prefix_path, catkin_prefix_paths) {
boost::filesystem::path path(catkin_prefix_path);
boost::filesystem::path lib("lib");
lib_paths.push_back((path / lib).string());
}
}
return lib_paths;
}

template<class T>
Expand Down