From 2aaa48f0d821fe7140d7caafa9f330f19de04ad0 Mon Sep 17 00:00:00 2001 From: Olivier Stasse <ostasse@laas.fr> Date: Fri, 29 Apr 2016 18:11:46 +0200 Subject: [PATCH] Create a sot_loader library to simplifies the embedding on a new robot. --- CMakeLists.txt | 9 +++++++++ {src => include/dynamic_graph_bridge}/sot_loader.hh | 0 src/geometric_simu.cpp | 2 +- src/sot_loader.cpp | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) rename {src => include/dynamic_graph_bridge}/sot_loader.hh (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f76f312..786c878 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,7 @@ set(CUSTOM_HEADER_DIR dynamic_graph_bridge) set(${PROJECT_NAME}_HEADERS include/dynamic_graph_bridge/ros_init.hh include/dynamic_graph_bridge/ros_interpreter.hh + include/dynamic_graph_bridge/sot_loader.hh ) include(cmake/base.cmake) include(cmake/ros.cmake) @@ -153,6 +154,14 @@ add_executable(geometric_simu src/geometric_simu.cpp src/sot_loader.cpp) pkg_config_use_dependency(geometric_simu roscpp) target_link_libraries(geometric_simu ros_bridge ${Boost_LIBRARIES} dl) +# Sot loader library +add_library(sot_loader src/sot_loader.cpp) +pkg_config_use_dependency(sot_loader dynamic-graph) +pkg_config_use_dependency(sot_loader sot-core) +target_link_libraries(sot_loader ${Boost_LIBRARIES}) +install(TARGETS sot_loader DESTINATION lib) + + add_subdirectory(src) # Deal with the ROS part. diff --git a/src/sot_loader.hh b/include/dynamic_graph_bridge/sot_loader.hh similarity index 100% rename from src/sot_loader.hh rename to include/dynamic_graph_bridge/sot_loader.hh diff --git a/src/geometric_simu.cpp b/src/geometric_simu.cpp index 56f31cc..f6cfffb 100644 --- a/src/geometric_simu.cpp +++ b/src/geometric_simu.cpp @@ -20,7 +20,7 @@ #include <boost/thread/thread.hpp> #include <boost/thread/condition.hpp> -#include "sot_loader.hh" +#include <dynamic_graph_bridge/sot_loader.hh> boost::condition_variable cond; boost::mutex mut; diff --git a/src/sot_loader.cpp b/src/sot_loader.cpp index d347064..cc63d43 100644 --- a/src/sot_loader.cpp +++ b/src/sot_loader.cpp @@ -20,7 +20,7 @@ /* --- INCLUDES ------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ -#include "sot_loader.hh" +#include <dynamic_graph_bridge/sot_loader.hh> // POSIX.1-2001 #include <dlfcn.h> -- GitLab