Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Humanoid Path Planner
hpp-core
Commits
7b76c701
Commit
7b76c701
authored
4 months ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
plugins: look for HPP_PLUGIN_DIRS
parent
d42bbbc5
No related branches found
No related tags found
No related merge requests found
Pipeline
#43920
passed
4 months ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/core/plugin.hh
+5
-2
5 additions, 2 deletions
include/hpp/core/plugin.hh
src/plugin.cc
+9
-0
9 additions, 0 deletions
src/plugin.cc
with
14 additions
and
2 deletions
include/hpp/core/plugin.hh
+
5
−
2
View file @
7b76c701
...
...
@@ -82,8 +82,11 @@ class ProblemSolverPlugin {
namespace
plugin
{
/// Find the absolute path to a library named name.
/// \param name
/// \return name if it is an absolute path. Otherwise, for each path in
/// LD_LIBRARY_PATH environment variable, look for path/hppPlugins/name.
/// \return name if it is an absolute path.
/// Otherwise, for each path in HPP_PLUGIN_DIRS environment variable,
/// look for path/hppPlugins/name.
/// Otherwise, for each path in LD_LIBRARY_PATH environment variable,
/// look for path/hppPlugins/name.
/// \throw std::invalid_argument if not valid file found.
std
::
string
findPluginLibrary
(
const
std
::
string
&
name
);
...
...
This diff is collapsed.
Click to expand it.
src/plugin.cc
+
9
−
0
View file @
7b76c701
...
...
@@ -42,6 +42,15 @@ namespace core {
namespace
plugin
{
std
::
string
findPluginLibrary
(
const
std
::
string
&
name
)
{
if
(
fs
::
path
(
name
).
is_absolute
())
return
name
;
std
::
vector
<
std
::
string
>
ppaths
=
::
pinocchio
::
extractPathFromEnvVar
(
"HPP_PLUGIN_DIRS"
,
":"
);
for
(
std
::
size_t
i
=
0
;
i
<
ppaths
.
size
();
++
i
)
{
fs
::
path
lib
(
ppaths
[
i
]);
lib
/=
"hppPlugins"
;
lib
/=
name
;
if
(
fs
::
is_regular_file
(
lib
))
return
lib
.
native
();
}
std
::
vector
<
std
::
string
>
ldpaths
=
::
pinocchio
::
extractPathFromEnvVar
(
"LD_LIBRARY_PATH"
,
":"
);
for
(
std
::
size_t
i
=
0
;
i
<
ldpaths
.
size
();
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment