diff --git a/CMakeLists.txt b/CMakeLists.txt index 945facafa1d6c0f9997c0544990773dd6dabb73a..ebc7c505d5c5aa37d0795504c740048c8a8a8ac3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,7 @@ SET(libs zmp-from-forces ) -LIST(APPEND libs dynamic) +LIST(APPEND libs dynamic_plugin) LIST(APPEND LOGGING_WATCHED_TARGETS ${libs}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2e3eeb05d0f21d8b5d295f77974b0b163cec1337..aafe650c56414731bb0bccb03b866b7a7db7fb19 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -60,6 +60,18 @@ FOREACH(lib ${libs}) ) ENDFOREACH(lib) +# Main Library +ADD_LIBRARY(dynamic SHARED dynamic.cpp) +TARGET_LINK_LIBRARIES(dynamic jrl-dynamics) +TARGET_LINK_LIBRARIES(dynamic sot-core) +TARGET_LINK_LIBRARIES(dynamic dynamic-graph) +PKG_CONFIG_USE_DEPENDENCY(dynamic jrl-dynamics) +PKG_CONFIG_USE_DEPENDENCY(dynamic sot-core) +PKG_CONFIG_USE_DEPENDENCY(dynamic dynamic-graph) + +INSTALL(TARGETS dynamic DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + # Install empty __init__.py files in intermediate directories. INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/dynamics/__init__.py diff --git a/src/dynamic.cpp b/src/dynamic.cpp index 378c206e191544b215cdae529db1c8937c2a881c..199faee8b24f3c74a10aae175883fdb64168533d 100644 --- a/src/dynamic.cpp +++ b/src/dynamic.cpp @@ -29,7 +29,6 @@ #include <abstract-robot-dynamics/humanoid-dynamic-robot.hh> #include <abstract-robot-dynamics/robot-dynamics-object-constructor.hh> -#include <dynamic-graph/factory.h> #include <dynamic-graph/all-commands.h> #include "../src/dynamic-command.h" @@ -38,7 +37,7 @@ using namespace dynamicgraph::sot; using namespace dynamicgraph; -DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(Dynamic,"Dynamic"); +const std::string dynamicgraph::sot::Dynamic::CLASS_NAME = "Dynamic"; using namespace std; diff --git a/src/dynamic_plugin.cpp b/src/dynamic_plugin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..78b1d2cd98c2cd878456657aeb87cc7a003c6c5f --- /dev/null +++ b/src/dynamic_plugin.cpp @@ -0,0 +1,27 @@ +/* + * Copyright 2010, + * François Bleibel, + * Olivier Stasse, + * + * CNRS/AIST + * + * This file is part of sot-dynamic. + * sot-dynamic is free software: you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * sot-dynamic is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. You should + * have received a copy of the GNU Lesser General Public License along + * with sot-dynamic. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <sot-dynamic/dynamic.h> +#include <dynamic-graph/factory.h> + +using namespace dynamicgraph::sot; +using namespace dynamicgraph; + +DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(Dynamic,"Dynamic");