Skip to content

Commit

Permalink
Merge pull request #141 from prashanthr05/cmake/refactor-contact
Browse files Browse the repository at this point in the history
Make compilation of Contact library independent from Planners library
  • Loading branch information
S-Dafarra authored Nov 25, 2020
2 parents 64708a7 + 2201827 commit 862254f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions cmake/BipedalLocomotionFrameworkFindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ framework_dependent_option(FRAMEWORK_COMPILE_Estimators
"Compile Estimators library?" ON
"" OFF)

framework_dependent_option(FRAMEWORK_COMPILE_Contact
"Compile Contact libraries?" ON
"FRAMEWORK_USE_manif" OFF)

framework_dependent_option(FRAMEWORK_COMPILE_Planners
"Compile Planners libraries?" ON
"FRAMEWORK_USE_Qhull;FRAMEWORK_USE_casadi;FRAMEWORK_USE_manif" OFF)
Expand Down
11 changes: 8 additions & 3 deletions src/Planners/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
# This software may be modified and distributed under the terms of the
# GNU Lesser General Public License v2.1 or any later version.

if (FRAMEWORK_COMPILE_Planners)

if (FRAMEWORK_COMPILE_Contact)
set(H_PREFIX include/BipedalLocomotion/Planners)

add_bipedal_locomotion_library(
NAME Contact
PUBLIC_HEADERS ${H_PREFIX}/Contact.h ${H_PREFIX}/ContactList.h ${H_PREFIX}/ContactPhase.h ${H_PREFIX}/ContactPhaseList.h
SOURCES src/Contact.cpp src/ContactList.cpp src/ContactPhase.cpp src/ContactPhaseList.cpp
PUBLIC_LINK_LIBRARIES MANIF::manif
INSTALLATION_FOLDER Planners
)
INSTALLATION_FOLDER Planners)

endif()

if (FRAMEWORK_COMPILE_Planners)

set(H_PREFIX include/BipedalLocomotion/Planners)

add_bipedal_locomotion_library(
NAME Planners
Expand Down

0 comments on commit 862254f

Please sign in to comment.