Skip to content
Snippets Groups Projects
CMakeLists.txt 594 B
Newer Older
Steve Tonneau's avatar
Steve Tonneau committed
# Define the wrapper library that wraps our library
Guilhem Saurel's avatar
Guilhem Saurel committed
add_library(${PY_NAME} SHARED centroidal_dynamics_python.cpp)
target_link_libraries(${PY_NAME} ${PROJECT_NAME} eigenpy::eigenpy)
Steve Tonneau's avatar
Steve Tonneau committed
# don't prepend wrapper library name with lib
Guilhem Saurel's avatar
Guilhem Saurel committed
set_target_properties(${PY_NAME} PROPERTIES PREFIX "")
Guilhem Saurel's avatar
Guilhem Saurel committed
if(APPLE)
Guilhem Saurel's avatar
Guilhem Saurel committed
  # We need to change the extension for python bindings
Guilhem Saurel's avatar
Guilhem Saurel committed
  set_target_properties(${PY_NAME} PROPERTIES SUFFIX ".so")
endif(APPLE)
Steve Tonneau's avatar
Steve Tonneau committed

Guilhem Saurel's avatar
Guilhem Saurel committed
install(TARGETS ${PY_NAME} DESTINATION ${PYTHON_SITELIB})
Guilhem Saurel's avatar
Guilhem Saurel committed

Guilhem Saurel's avatar
Guilhem Saurel committed
add_python_unit_test("python-centroidal-dynamics"
                     "python/test/binding_tests.py" "python")