Skip to content

Commit

Permalink
find plugins from dlopen instead of LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
alaurenzi committed Jan 24, 2024
1 parent 38416a2 commit f3027a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

cmake_minimum_required(VERSION 3.0)
include(ExternalProject)
project(open_sot VERSION 3.3.0)
project(open_sot VERSION 3.4.0)

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++17" COMPILER_SUPPORTS_CXX17)
Expand Down
14 changes: 7 additions & 7 deletions src/solvers/BackEndFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OpenSoT::solvers::BackEnd::Ptr OpenSoT::solvers::BackEndFactory(const solver_bac
if(be_solver == solver_back_ends::qpOASES) {

/* Obtain full path to shared lib */
std::string path_to_shared_lib = XBot::Utils::FindLib("libOpenSotBackEndQPOases.so", "LD_LIBRARY_PATH");
std::string path_to_shared_lib = "libOpenSotBackEndQPOases.so";
if (path_to_shared_lib == "") {
throw std::runtime_error("libOpenSotBackEndQPOases.so must be listed inside LD_LIBRARY_PATH");
}
Expand All @@ -22,7 +22,7 @@ OpenSoT::solvers::BackEnd::Ptr OpenSoT::solvers::BackEndFactory(const solver_bac
if(be_solver == solver_back_ends::OSQP) {

/* Obtain full path to shared lib */
std::string path_to_shared_lib = XBot::Utils::FindLib("libOpenSotBackEndOSQP.so", "LD_LIBRARY_PATH");
std::string path_to_shared_lib = "libOpenSotBackEndOSQP.so";
if (path_to_shared_lib == "") {
throw std::runtime_error("libOpenSotBackEndOSQP.so must be listed inside LD_LIBRARY_PATH");
}
Expand All @@ -35,7 +35,7 @@ OpenSoT::solvers::BackEnd::Ptr OpenSoT::solvers::BackEndFactory(const solver_bac
if(be_solver == solver_back_ends::GLPK) {

/* Obtain full path to shared lib */
std::string path_to_shared_lib = XBot::Utils::FindLib("libOpenSotBackEndGLPK.so", "LD_LIBRARY_PATH");
std::string path_to_shared_lib = "libOpenSotBackEndGLPK.so";
if (path_to_shared_lib == "") {
throw std::runtime_error("libOpenSotBackEndGLPK.so must be listed inside LD_LIBRARY_PATH");
}
Expand All @@ -48,7 +48,7 @@ OpenSoT::solvers::BackEnd::Ptr OpenSoT::solvers::BackEndFactory(const solver_bac
if(be_solver == solver_back_ends::eiQuadProg) {

/* Obtain full path to shared lib */
std::string path_to_shared_lib = XBot::Utils::FindLib("libOpenSotBackEndeiQuadProg.so", "LD_LIBRARY_PATH");
std::string path_to_shared_lib = "libOpenSotBackEndeiQuadProg.so";
if (path_to_shared_lib == "") {
throw std::runtime_error("libOpenSotBackEnduQuadProg.so must be listed inside LD_LIBRARY_PATH");
}
Expand All @@ -61,7 +61,7 @@ OpenSoT::solvers::BackEnd::Ptr OpenSoT::solvers::BackEndFactory(const solver_bac
if(be_solver == solver_back_ends::ODYS) {

/* Obtain full path to shared lib */
std::string path_to_shared_lib = XBot::Utils::FindLib("libOpenSotBackEndODYS.so", "LD_LIBRARY_PATH");
std::string path_to_shared_lib = "libOpenSotBackEndODYS.so";
if (path_to_shared_lib == "") {
throw std::runtime_error("libOpenSotBackEndODYS.so must be listed inside LD_LIBRARY_PATH");
}
Expand All @@ -74,7 +74,7 @@ OpenSoT::solvers::BackEnd::Ptr OpenSoT::solvers::BackEndFactory(const solver_bac
if(be_solver == solver_back_ends::qpSWIFT) {

/* Obtain full path to shared lib */
std::string path_to_shared_lib = XBot::Utils::FindLib("libOpenSotBackEndqpSWIFT.so", "LD_LIBRARY_PATH");
std::string path_to_shared_lib = "libOpenSotBackEndqpSWIFT.so";
if (path_to_shared_lib == "") {
throw std::runtime_error("libOpenSotBackEndqpSWIFT.so must be listed inside LD_LIBRARY_PATH");
}
Expand All @@ -87,7 +87,7 @@ OpenSoT::solvers::BackEnd::Ptr OpenSoT::solvers::BackEndFactory(const solver_bac
if(be_solver == solver_back_ends::proxQP) {

/* Obtain full path to shared lib */
std::string path_to_shared_lib = XBot::Utils::FindLib("libOpenSotBackEndproxQP.so", "LD_LIBRARY_PATH");
std::string path_to_shared_lib = "libOpenSotBackEndproxQP.so";
if (path_to_shared_lib == "") {
throw std::runtime_error("libOpenSotBackEndproxQP.so must be listed inside LD_LIBRARY_PATH");
}
Expand Down

0 comments on commit f3027a2

Please sign in to comment.