From bcaee45d39bc5355578810e862016433c1e79ebe Mon Sep 17 00:00:00 2001 From: florent <florent@laas.fr> Date: Mon, 13 Dec 2010 09:00:41 +0100 Subject: [PATCH] Add dependency to jrl-mal * CMakeLists.txt, * include/dynamic-graph/linear-algebra.h, * src/CMakeLists.txt. For homogeneity, we use jrl-mal for matrices and vectors. --- CMakeLists.txt | 3 +++ include/dynamic-graph/linear-algebra.h | 7 ++++--- src/CMakeLists.txt | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7897409..56fe98c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,9 @@ SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) SETUP_PROJECT() +# Trigger dependency to jrl-mal +ADD_REQUIRED_DEPENDENCY("jrl-mal >= 1.8.0") + # Add configuration headers for plug-ins. GENERATE_CONFIGURATION_HEADER( ${HEADER_DIR} config-tracer.hh DG_TRACER tracer_EXPORTS) diff --git a/include/dynamic-graph/linear-algebra.h b/include/dynamic-graph/linear-algebra.h index 0ec3dd1..62cc76d 100644 --- a/include/dynamic-graph/linear-algebra.h +++ b/include/dynamic-graph/linear-algebra.h @@ -18,11 +18,12 @@ #ifndef DYNAMIC_GRAPH_LINEAR_ALGEBRA_H #define DYNAMIC_GRAPH_LINEAR_ALGEBRA_H -#include <boost/numeric/ublas/vector.hpp> +#include <jrl/mal/boost.hh> #include <boost/numeric/ublas/matrix.hpp> + namespace dynamicgraph { - typedef ::boost::numeric::ublas::vector<double> Vector; - typedef ::boost::numeric::ublas::matrix<double> Matrix; + typedef maal::boost::Vector Vector; + typedef maal::boost::Matrix Matrix; } #endif //DYNAMIC_GRAPH_LINEAR_ALGEBRA_H diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3c3a28f..5554891 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,8 @@ ADD_LIBRARY(${LIBRARY_NAME} SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION}) +PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} jrl-mal) + IF (UNIX) TARGET_LINK_LIBRARIES(${LIBRARY_NAME} dl pthread) ENDIF (UNIX) -- GitLab