Commit c7cbc8f2 authored by Francois Bleibel's avatar Francois Bleibel
Browse files

Porting commit bd6445d0f from SOT.

parent 62c64d78
......@@ -53,29 +53,63 @@ ELSE(PACKAGE_REQUIREMENTS STREQUAL "")
SET(PACKAGE_REQUIREMENTS "${PACKAGE_REQUIREMENTS}, ${DYNAMICSJRLJAPAN_REQUIRED}")
ENDIF(PACKAGE_REQUIREMENTS STREQUAL "")
#
# Dependency to package hrp2Dynamics
#
SET(HRP2DYNAMICS_FOUND 0)
SET(HRP2DYNAMICS_REQUIRED "hrp2Dynamics >= 1.3.0")
PKG_CHECK_MODULES(HRP2DYNAMICS REQUIRED ${HRP2DYNAMICS_REQUIRED})
EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS --variable=docdir hrp2Dynamics
OUTPUT_VARIABLE HRP2DYNAMICS_DOCDIR)
MESSAGE(STATUS "pkg-config: ${PKG_CONFIG_EXECUTABLE}")
MESSAGE(STATUS "HRP2DYNAMICS_DOCDIR=${HRP2DYNAMICS_DOCDIR}")
SET(HRP2DYNAMICS_FOUND 1)
IF(NOT ${HRP2DYNAMICS_FOUND})
MESSAGE(FATAL_ERROR "Check that package hrp2Dynamics is installed in a directory pointed out by PKG_CONFIG_PATH.")
ENDIF(NOT ${HRP2DYNAMICS_FOUND})
IF(PACKAGE_REQUIREMENTS STREQUAL "")
SET(PACKAGE_REQUIREMENTS ${HRP2DYNAMICS_REQUIRED})
ELSE(PACKAGE_REQUIREMENTS STREQUAL "")
SET(PACKAGE_REQUIREMENTS "${PACKAGE_REQUIREMENTS}, ${HRP2DYNAMICS_REQUIRED}")
ENDIF(PACKAGE_REQUIREMENTS STREQUAL "")
# --- HRP2DYNAMICS ---------------------------------------
SET(_hrp2Dynamics_FOUND 0)
SET(_hrp2Dynamics_REQUIRED "hrp2Dynamics >= 1.3.0")
#PKG_CHECK_MODULES(_hrp2Dynamics REQUIRED ${_hrp2Dynamics_REQUIRED})
PKG_CHECK_MODULES(_hrp2Dynamics ${_hrp2Dynamics_REQUIRED})
IF(${_hrp2Dynamics_FOUND})
LIST(APPEND PACKAGE_REQUIREMENTS ${_hrp2Dynamics_REQUIRED})
# MESSAGE(FATAL_ERROR "Check that package hrp2Dynamics is installed in a directory pointed out by PKG_CONFIG_PATH.")
ENDIF(${_hrp2Dynamics_FOUND})
# --- HRP2-10-Optimized ---------------------------------------
SET(_hrp210optimized_FOUND 0)
SET(_hrp210optimized_REQUIRED "hrp2-10-optimized >= 1.0")
#PKG_CHECK_MODULES(_hrp2Dynamics REQUIRED ${_hrp2Dynamics_REQUIRED})
PKG_CHECK_MODULES(_hrp210optimized ${_hrp210optimized_REQUIRED})
IF(${_hrp210optimized_FOUND})
LIST(APPEND PACKAGE_REQUIREMENTS ${_hrp210optimized_REQUIRED})
# MESSAGE(FATAL_ERROR "Check that package hrp2Dynamics is installed in a directory pointed out by PKG_CONFIG_PATH.")
ENDIF(${_hrp210optimized_FOUND})
# --- Robots ---------------------------------------
SET(_hrp2_10_small_FOUND 0)
SET(_hrp2_10_small_package "hrp2_10-small")
PKG_CHECK_MODULES(_hrp2_10_small ${_hrp2_10_small_package})
IF(NOT ${_hrp2_10_small_FOUND})
MESSAGE(STATUS "hrp2_10_small not found.")
ELSE(NOT ${_hrp2_10_small_FOUND})
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS hrp2_10-small --variable=datadir
OUTPUT_VARIABLE HRP2_10-SMALL_DIRECTORY )
MESSAGE(STATUS "HRP2_10-SMALL_DIRECTORY: ${HRP2_10-SMALL_DIRECTORY}")
ENDIF(NOT ${_hrp2_10_small_FOUND})
SET(_hrp2_10_small_old_FOUND 0)
SET(_hrp2_10_small_old_package "hrp2_10-small-old")
PKG_CHECK_MODULES(_hrp2_10_small_old ${_hrp2_10_small_old_package})
IF(NOT ${_hrp2_10_small_old_FOUND})
MESSAGE(STATUS "hrp2_10_small_old not found.")
ELSE(NOT ${_hrp2_10_small_old_FOUND})
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS hrp2_10-small-old --variable=datadir
OUTPUT_VARIABLE HRP2_10-SMALL-OLD_DIRECTORY )
MESSAGE(STATUS "HRP2_10-SMALL-OLD_DIRECTORY: ${HRP2_10-SMALL-OLD_DIRECTORY}")
ENDIF(NOT ${_hrp2_10_small_old_FOUND})
SET(_hrp2_10_FOUND 0)
SET(_hrp2_10_package "hrp2_10")
PKG_CHECK_MODULES(_hrp2_10 ${_hrp2_10_package})
IF(NOT ${_hrp2_10_FOUND})
MESSAGE(STATUS "hrp2_10 not found.")
ELSE(NOT ${_hrp2_10_FOUND})
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS hrp2_10 --variable=datadir
OUTPUT_VARIABLE HRP2_10_DIRECTORY )
MESSAGE(STATUS "HRP2_10_DIRECTORY: ${HRP2_10_DIRECTORY}")
ENDIF(NOT ${_hrp2_10_FOUND})
#
# Dependency to package dynamic-graph
......
......@@ -159,7 +159,7 @@ SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
TAGFILES = \
/home/blue/sot-lib/share/doc/dynamicsJRLJapan/html/dynamicsJRLJapan.doxytag=/home/blue/sot-lib/share/doc/dynamicsJRLJapan/html \
/home/blue/sot-lib/share/doc/hrp2Dynamics/html/hrp2Dynamics.doxytag=/home/blue/sot-lib/share/doc/hrp2Dynamics/html \
/html/hrp2Dynamics.doxytag=/html \
/home/blue/sot-lib/share/doc/dynamic-graph/html/dynamic-graph.doxytag=/home/blue/sot-lib/share/doc/dynamic-graph/html \
/home/blue/sot-lib/share/doc/sot-core/html/sot-core.doxytag=/home/blue/sot-lib/share/doc/sot-core/html \
/home/blue/sot-lib/share/doc/MatrixAbstractLayer/html/MatrixAbstractLayer.doxytag=/home/blue/sot-lib/share/doc/MatrixAbstractLayer/html
......
......@@ -81,19 +81,16 @@ SET(libs
integrator-force
angle-estimator
waist-attitude-from-sensor
dynamic
dynamic-hrp2
)
IF(${_dynamicsJRLJapan_FOUND})
IF(${DYNAMICSJRLJAPAN_FOUND})
LIST(APPEND libs dynamic)
IF(${_hrp2Dynamics_FOUND})
LIST(APPEND libs dynamic-hrp2)
SET (dynamic-hrp2_plugins_dependencies dynamic)
ENDIF(${_hrp2Dynamics_FOUND})
ENDIF(${_dynamicsJRLJapan_FOUND})
IF(${_hrp2Dynamics_FOUND})
LIST(APPEND libs dynamic-hrp2)
SET (dynamic-hrp2_plugins_dependencies dynamic)
ENDIF(${_hrp2Dynamics_FOUND})
SET(integrator-force-rk4_plugins_dependencies integrator-force)
SET(integrator-force-exact_plugins_dependencies integrator-force)
......
......@@ -27,8 +27,11 @@ TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME}
integrator-force
angle-estimator
waist-attitude-from-sensor
dynamic
dynamic-hrp2)
)
IF(${DYNAMICSJRLJAPAN_FOUND} AND ${_hrp2Dynamics_FOUND})
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} dynamic dynamic-hrp2)
ENDIF(${DYNAMICSJRLJAPAN_FOUND} AND ${_hrp2Dynamics_FOUND})
IF (UNIX)
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} ${DYNAMIC_GRAPH_LIBRARIES})
......
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