Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-centroidal-dynamics
Commits
d6d07d21
Commit
d6d07d21
authored
Sep 24, 2019
by
Guilhem Saurel
Browse files
[CMake] fix python 3
parent
ec38684d
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
d6d07d21
...
...
@@ -4,6 +4,7 @@ INCLUDE(cmake/base.cmake)
INCLUDE
(
cmake/test.cmake
)
INCLUDE
(
cmake/python.cmake
)
INCLUDE
(
cmake/hpp.cmake
)
INCLUDE
(
cmake/boost.cmake
)
SET
(
PROJECT_NAME hpp-centroidal-dynamics
)
SET
(
PROJECT_DESCRIPTION
...
...
@@ -27,9 +28,9 @@ IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON
()
include_directories
(
SYSTEM
${
PYTHON_INCLUDE_DIRS
}
)
find_package
(
Boost COMPONENTS python REQUIRED
)
SET
(
BOOST_COMPONENTS python
)
SEARCH_FOR_BOOST
()
include_directories
(
SYSTEM
${
Boost_INCLUDE_DIR
}
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
ADD_REQUIRED_DEPENDENCY
(
"eigen3"
)
...
...
python/CMakeLists.txt
View file @
d6d07d21
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
)
add_library
(
${
PY_NAME
}
SHARED centroidal_dynamics_python
)
target_link_libraries
(
${
PY_NAME
}
${
Boost_LIBRARIES
}
${
PROJECT_NAME
}
)
# don't prepend wrapper library name with lib
set_target_properties
(
${
PY_NAME
}
PROPERTIES PREFIX
""
)
IF
(
APPLE
)
# We need to change the extension for python bindings
# 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
}
)
ADD_PYTHON_UNIT_TEST
(
"python-centroidal-dynamics"
"python/test/binding_tests.py"
"python"
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment