Skip to content

Commit

Permalink
read move4d plugins to load from env variable
Browse files Browse the repository at this point in the history
the list of plugin to load is read at run time in the environment
variable $MOVE4D_PLUGIN_LIBRARIES.
If it is not set, it reads the variable defined at compile time in
CMakeLists.txt
  • Loading branch information
juleswh committed Sep 13, 2018
1 parent f0f6167 commit d20aba3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/templates/plugins.cpp.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#include "move4d_ros_lib/plugins.hpp"
#include <cstdlib>

std::vector<std::string> plugins_found_at_compile(){
std::string raw= "@MOVE4D_PLUGINS_LIBRARIES@";
char *env=std::getenv("MOVE4D_PLUGIN_LIBRARIES");
std::string config= "@MOVE4D_PLUGINS_LIBRARIES@";
std::string raw = (env ? env : config);
std::vector<std::string> ret;
size_t p = 0;
unsigned int imax=100;
Expand Down

0 comments on commit d20aba3

Please sign in to comment.