Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including Eigen as a private dependency in all targets using EigenHelpers #62

Merged
merged 1 commit into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions cmake/WalkingControllersFindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ checkandset_dependency(ICUBcontrib)
find_package(iDynTree QUIET)
checkandset_dependency(iDynTree)

find_package(Eigen3 3.2.92 QUIET)
checkandset_dependency(Eigen3)

find_package(UnicyclePlanner 0.1.102 QUIET)
checkandset_dependency(UnicyclePlanner)

Expand All @@ -148,18 +151,18 @@ checkandset_dependency(Catch2)

walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_tests "Compile tests?" ON WALKING_CONTROLLERS_HAS_Catch2 OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_YarpUtilities "Compile YarpHelper library?" ON WALKING_CONTROLLERS_HAS_YARP OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_iDynTreeUtilities "Compile iDynTreeHelper library?" ON "WALKING_CONTROLLERS_HAS_iDynTree;WALKING_CONTROLLERS_HAS_YARP" OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_iDynTreeUtilities "Compile iDynTreeHelper library?" ON "WALKING_CONTROLLERS_HAS_iDynTree;WALKING_CONTROLLERS_HAS_YARP;WALKING_CONTROLLERS_HAS_Eigen3" OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_SimplifiedModelControllers "Compile SimplifiedModelControllers library?" ON
"WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_COMPILE_iDynTreeUtilities;WALKING_CONTROLLERS_HAS_osqp;WALKING_CONTROLLERS_HAS_OsqpEigen" OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_RobotInterface "Compile RobotHelper library?" ON "WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_COMPILE_iDynTreeUtilities" OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_WholeBodyControllers "Compile WholeBodyControllers library?" ON
"WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_COMPILE_iDynTreeUtilities;WALKING_CONTROLLERS_HAS_osqp;WALKING_CONTROLLERS_HAS_OsqpEigen;WALKING_CONTROLLERS_HAS_qpOASES;WALKING_CONTROLLERS_HAS_ICUB" OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_TrajectoryPlanner "Compile TrajectoryPlanner library?" ON
"WALKING_CONTROLLERS_HAS_Threads;WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_HAS_ICUB;WALKING_CONTROLLERS_HAS_UnicyclePlanner" OFF)
"WALKING_CONTROLLERS_HAS_Threads;WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_HAS_ICUB;WALKING_CONTROLLERS_HAS_UnicyclePlanner;WALKING_CONTROLLERS_HAS_Eigen3" OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_KinDynWrapper "Compile KinDynWrapper library?" ON
"WALKING_CONTROLLERS_HAS_iDynTree;WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_HAS_ICUB" OFF)
"WALKING_CONTROLLERS_HAS_iDynTree;WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_HAS_ICUB;WALKING_CONTROLLERS_HAS_Eigen3" OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_RetargetingHelper "Compile RetargetingHelper library?" ON
"WALKING_CONTROLLERS_HAS_iDynTree;WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_HAS_ICUB" OFF)
"WALKING_CONTROLLERS_HAS_iDynTree;WALKING_CONTROLLERS_COMPILE_YarpUtilities;WALKING_CONTROLLERS_HAS_ICUB;WALKING_CONTROLLERS_HAS_Eigen3" OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_LoggerClient "Compile LoggerClient library?" ON WALKING_CONTROLLERS_COMPILE_YarpUtilities OFF)

walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_WalkingModule "Compile WalkingModule app?" ON
Expand Down
3 changes: 2 additions & 1 deletion src/KinDynWrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ if(WALKING_CONTROLLERS_COMPILE_KinDynWrapper)
target_link_libraries(${LIBRARY_TARGET_NAME} PUBLIC
WalkingControllers::YarpUtilities
${iDynTree_LIBRARIES}
ctrlLib)
ctrlLib
PRIVATE Eigen3::Eigen)

add_library(WalkingControllers::${LIBRARY_TARGET_NAME} ALIAS ${LIBRARY_TARGET_NAME})

Expand Down
3 changes: 2 additions & 1 deletion src/RetargetingHelper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ if(WALKING_CONTROLLERS_COMPILE_RetargetingHelper)
target_link_libraries(${LIBRARY_TARGET_NAME} PUBLIC
WalkingControllers::YarpUtilities
${iDynTree_LIBRARIES}
ctrlLib)
ctrlLib
PRIVATE Eigen3::Eigen)

add_library(WalkingControllers::${LIBRARY_TARGET_NAME} ALIAS ${LIBRARY_TARGET_NAME})

Expand Down
3 changes: 2 additions & 1 deletion src/RobotInterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ if(WALKING_CONTROLLERS_COMPILE_RobotInterface)

target_link_libraries(${LIBRARY_TARGET_NAME} PUBLIC
WalkingControllers::YarpUtilities
WalkingControllers::iDynTreeUtilities)
WalkingControllers::iDynTreeUtilities
PRIVATE Eigen3::Eigen)

add_library(WalkingControllers::${LIBRARY_TARGET_NAME} ALIAS ${LIBRARY_TARGET_NAME})

Expand Down
3 changes: 2 additions & 1 deletion src/TrajectoryPlanner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ if(WALKING_CONTROLLERS_COMPILE_TrajectoryPlanner)
Threads::Threads
WalkingControllers::YarpUtilities
UnicyclePlanner
ctrlLib)
ctrlLib
PRIVATE Eigen3::Eigen)

add_library(WalkingControllers::${LIBRARY_TARGET_NAME} ALIAS ${LIBRARY_TARGET_NAME})

Expand Down
3 changes: 2 additions & 1 deletion src/iDynTreeUtilities/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ if(WALKING_CONTROLLERS_COMPILE_iDynTreeUtilities)
# add an executable to the project using the specified source files.
add_library(${LIBRARY_TARGET_NAME} SHARED ${${LIBRARY_TARGET_NAME}_SRC} ${${LIBRARY_TARGET_NAME}_HDR})

target_link_libraries(${LIBRARY_TARGET_NAME} PUBLIC ${iDynTree_LIBRARIES} YARP::YARP_OS)
target_link_libraries(${LIBRARY_TARGET_NAME} PUBLIC ${iDynTree_LIBRARIES} YARP::YARP_OS
PRIVATE Eigen3::Eigen)

add_library(WalkingControllers::${LIBRARY_TARGET_NAME} ALIAS ${LIBRARY_TARGET_NAME})
set_target_properties(${LIBRARY_TARGET_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}${LIBRARY_TARGET_NAME}")
Expand Down