Skip to content

Commit

Permalink
[CMake] keep the python module as a folder for now
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Mar 23, 2020
1 parent 598516f commit 80cd00c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 10 additions & 2 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ IF(APPLE)
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES SUFFIX ".so")
ENDIF(APPLE)

SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES PREFIX "" OUTPUT_NAME ${PROJECT_NAME})
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_NAME})

INSTALL(TARGETS ${PYWRAP} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION ${PYTHON_SITELIB})
INSTALL(TARGETS ${PYWRAP} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION ${PYTHON_SITELIB}/${PROJECT_NAME})

SET(PYTHON_FILES
__init__.py
)

FOREACH(python ${PYTHON_FILES})
PYTHON_INSTALL_ON_SITE(${PROJECT_NAME} ${python})
ENDFOREACH(python)
3 changes: 2 additions & 1 deletion bindings/python/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
namespace bp = boost::python;
using namespace tsid::python;

BOOST_PYTHON_MODULE(tsid) {
BOOST_PYTHON_MODULE(libtsid_pywrap)
{
eigenpy::enableEigenPy();
eigenpy::exposeAngleAxis();
eigenpy::exposeQuaternion();
Expand Down
1 change: 1 addition & 0 deletions bindings/python/tsid/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .libtsid_pywrap import *

0 comments on commit 80cd00c

Please sign in to comment.