Commit def06893 authored by florent-lamiraux's avatar florent-lamiraux
Browse files

Merge pull request #4 from bcoudrin/master

Separate dynamic plugin and dynamic lib
parents 97133711 ba997b84
......@@ -48,7 +48,7 @@ ADD_REQUIRED_DEPENDENCY("sot-core >= 2.5")
ADD_REQUIRED_DEPENDENCY("sot-tools")
# List plug-ins that will be compiled.
SET(libs
SET(plugins
zmpreffromcom
force-compensation
integrator-force-exact
......@@ -60,14 +60,14 @@ SET(libs
zmp-from-forces
)
LIST(APPEND libs dynamic)
SET(LIBRARY_NAME ${PROJECT_NAME})
LIST(APPEND plugins dynamic)
LIST(APPEND LOGGING_WATCHED_TARGETS ${libs})
LIST(APPEND LOGGING_WATCHED_TARGETS ${plugins})
# Add dependency toward sot-dynamic library in pkg-config file.
PKG_CONFIG_APPEND_LIBS_RAW(${DYNAMIC_GRAPH_PLUGINDIR}/dynamic.so)
PKG_CONFIG_APPEND_LIBRARY_DIR(${DYNAMIC_GRAPH_PLUGINDIR})
PKG_CONFIG_APPEND_LIBS(${LIBRARY_NAME})
# Search for dependencies.
# Boost
......
......@@ -30,7 +30,7 @@ SET(integrator-force-rk4_plugins_dependencies integrator-force)
SET(integrator-force-exact_plugins_dependencies integrator-force)
FOREACH(lib ${libs})
FOREACH(lib ${plugins})
ADD_LIBRARY(${lib} SHARED ${lib}.cpp)
SET_TARGET_PROPERTIES(${lib} PROPERTIES
......@@ -60,6 +60,19 @@ FOREACH(lib ${libs})
)
ENDFOREACH(lib)
# Main Library
ADD_LIBRARY(${LIBRARY_NAME} SHARED sot-dynamic.cpp)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} jrl-dynamics)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} sot-core)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} dynamic-graph)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} jrl-dynamics)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} sot-core)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} dynamic-graph)
INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
TARGET_LINK_LIBRARIES(dynamic ${LIBRARY_NAME})
# Install empty __init__.py files in intermediate directories.
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/dynamics/__init__.py
......
This diff is collapsed.
This diff is collapsed.
......@@ -50,6 +50,7 @@ FOREACH(test ${tests})
integrator-force
angle-estimator
waist-attitude-from-sensor
${LIBRARY_NAME}
)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} jrl-dynamics)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment