From e9b8450f54d82d5ba57e23b5ef67c42de4ee573e Mon Sep 17 00:00:00 2001 From: Guilhem Saurel <guilhem.saurel@laas.fr> Date: Tue, 4 Sep 2018 12:21:49 +0200 Subject: [PATCH] [CMake] depend on eigenpy only if we build the python interface --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af675df..4befdcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,6 @@ SET(PKG_CONFIG_ADDITIONAL_VARIABLES SETUP_PROJECT() # Search for dependencies. -ADD_REQUIRED_DEPENDENCY("eigenpy") ADD_REQUIRED_DEPENDENCY("pinocchio >= 1.3.0") ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 3.0.0") ADD_REQUIRED_DEPENDENCY("sot-core >= 3.0.0") @@ -56,6 +55,7 @@ IF(BUILD_PYTHON_INTERFACE) ADD_REQUIRED_DEPENDENCY("dynamic-graph-python >= 3.0.0") SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) + ADD_REQUIRED_DEPENDENCY("eigenpy") ENDIF(BUILD_PYTHON_INTERFACE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5c5b30a..2465809 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,7 +43,6 @@ FOREACH(lib ${plugins}) TARGET_LINK_LIBRARIES(${libname} ${Boost_LIBRARIES}) PKG_CONFIG_USE_DEPENDENCY(${libname} pinocchio) - PKG_CONFIG_USE_DEPENDENCY(${libname} eigenpy) PKG_CONFIG_USE_DEPENDENCY(${libname} sot-core) PKG_CONFIG_USE_DEPENDENCY(${libname} dynamic-graph) @@ -51,6 +50,7 @@ FOREACH(lib ${plugins}) # build python submodule IF(BUILD_PYTHON_INTERFACE) + PKG_CONFIG_USE_DEPENDENCY(${libname} eigenpy) STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${lib}) DYNAMIC_GRAPH_PYTHON_MODULE("sot/dynamics_pinocchio/${PYTHON_LIBRARY_NAME}" -- GitLab