Commit d6d07d21 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] fix python 3

parent ec38684d
......@@ -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")
......
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 "" )
......@@ -18,6 +16,6 @@ PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} eigenpy)
INSTALL(
TARGETS ${PY_NAME} DESTINATION ${PYTHON_SITELIB}
)
)
ADD_PYTHON_UNIT_TEST("python-centroidal-dynamics" "python/test/binding_tests.py" "python")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment