Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-centroidal-dynamics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Humanoid Path Planner
hpp-centroidal-dynamics
Commits
df31a610
Commit
df31a610
authored
5 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] put ADD_REQUIRED_DEPENDENCY in main CMakeLists
parent
980c08dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+18
-16
18 additions, 16 deletions
CMakeLists.txt
python/CMakeLists.txt
+4
-6
4 additions, 6 deletions
python/CMakeLists.txt
with
22 additions
and
22 deletions
CMakeLists.txt
+
18
−
16
View file @
df31a610
...
...
@@ -7,8 +7,8 @@ INCLUDE(cmake/hpp.cmake)
SET
(
PROJECT_NAME hpp-centroidal-dynamics
)
SET
(
PROJECT_DESCRIPTION
"Utility classes for testing (robust) equilibrium of a system in contact with the environment, and other centroidal dynamics methods."
)
"Utility classes for testing (robust) equilibrium of a system in contact with the environment, and other centroidal dynamics methods."
)
SET
(
CUSTOM_HEADER_DIR
"hpp/centroidal-dynamics"
)
...
...
@@ -23,13 +23,15 @@ MESSAGE( STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS} )
OPTION
(
BUILD_PYTHON_INTERFACE
"Build the python binding"
ON
)
IF
(
BUILD_PYTHON_INTERFACE
)
# search for python
FINDPYTHON
(
2.7 EXACT REQUIRED
)
find_package
(
PythonLibs 2.7 REQUIRED
)
include_directories
(
${
PYTHON_INCLUDE_DIRS
}
)
# search for python
FINDPYTHON
(
2.7 EXACT REQUIRED
)
find_package
(
PythonLibs 2.7 REQUIRED
)
include_directories
(
${
PYTHON_INCLUDE_DIRS
}
)
find_package
(
Boost COMPONENTS python REQUIRED
)
include_directories
(
${
Boost_INCLUDE_DIR
}
)
ADD_REQUIRED_DEPENDENCY
(
"eigenpy"
)
find_package
(
Boost COMPONENTS python REQUIRED
)
include_directories
(
${
Boost_INCLUDE_DIR
}
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
...
...
@@ -37,20 +39,20 @@ ADD_REQUIRED_DEPENDENCY("eigen3")
INCLUDE_DIRECTORIES
(
${
EIGEN3_INCLUDE_DIR
}
)
set
(
CMAKE_MODULE_PATH
${
PROJECT_SOURCE_DIR
}
/cmake/find-external/CDD
${
PROJECT_SOURCE_DIR
}
/cmake/find-external/CLP
${
PROJECT_SOURCE_DIR
}
/cmake/find-external/qpOASES
)
${
PROJECT_SOURCE_DIR
}
/cmake/find-external/CDD
${
PROJECT_SOURCE_DIR
}
/cmake/find-external/CLP
${
PROJECT_SOURCE_DIR
}
/cmake/find-external/qpOASES
)
find_package
(
CDD REQUIRED
)
find_package
(
qpOASES REQUIRED
)
find_package
(
CLP
)
IF
(
"
${
CLP_LIBRARY
}
"
STREQUAL
"CLP_LIBRARY-NOTFOUND"
)
message
(
STATUS
"CLP_LIBRARY equal to CLP_LIBRARY-NOTFOUND so I assume CLP was not found "
)
message
(
STATUS
"CLP_LIBRARY equal to CLP_LIBRARY-NOTFOUND so I assume CLP was not found "
)
else
()
message
(
STATUS
"CLP library found, defining macro CLP_FOUND"
)
add_definitions
(
-DCLP_FOUND
)
message
(
STATUS
"CLP library found, defining macro CLP_FOUND"
)
add_definitions
(
-DCLP_FOUND
)
endif
()
INCLUDE_DIRECTORIES
(
${
qpOASES_INCLUDE_DIRS
}
)
...
...
@@ -60,7 +62,7 @@ ADD_SUBDIRECTORY (include/${CUSTOM_HEADER_DIR})
add_subdirectory
(
src
)
add_subdirectory
(
test
)
IF
(
BUILD_PYTHON_INTERFACE
)
add_subdirectory
(
python
)
add_subdirectory
(
python
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
SETUP_PROJECT_FINALIZE
()
This diff is collapsed.
Click to expand it.
python/CMakeLists.txt
+
4
−
6
View file @
df31a610
...
...
@@ -2,8 +2,6 @@ cmake_minimum_required( VERSION 2.8 )
STRING
(
REGEX REPLACE
"-"
"_"
PY_NAME
${
PROJECT_NAME
}
)
ADD_REQUIRED_DEPENDENCY
(
"eigenpy"
)
# Define the wrapper library that wraps our library
add_library
(
${
PY_NAME
}
SHARED centroidal_dynamics_python.cpp
)
target_link_libraries
(
${
PY_NAME
}
${
Boost_LIBRARIES
}
${
PROJECT_NAME
}
)
...
...
@@ -11,14 +9,14 @@ target_link_libraries( ${PY_NAME} ${Boost_LIBRARIES} ${PROJECT_NAME} )
set_target_properties
(
${
PY_NAME
}
PROPERTIES PREFIX
""
)
IF
(
APPLE
)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES
(
${
PY_NAME
}
PROPERTIES SUFFIX
".so"
)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES
(
${
PY_NAME
}
PROPERTIES SUFFIX
".so"
)
ENDIF
(
APPLE
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PY_NAME
}
eigenpy
)
INSTALL
(
TARGETS
${
PY_NAME
}
DESTINATION
${
PYTHON_SITELIB
}
)
TARGETS
${
PY_NAME
}
DESTINATION
${
PYTHON_SITELIB
}
)
# TODO
#ADD_PYTHON_UNIT_TEST("python-centroidal-dynamics" "python/test/binding_tests.py" "python")
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment