CMakeLists.txt 1.17 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
SET(${PY_NAME}_BINDINGS_SOURCES
2
  curves_python.cpp
stevet's avatar
stevet committed
3
4
  optimization_python.cpp
  optimization_python.h
Guilhem Saurel's avatar
Guilhem Saurel committed
5
6
  python_variables.cpp
  python_variables.h
stevet's avatar
stevet committed
7
8
  namespace.cpp
  namespace.h
Guilhem Saurel's avatar
Guilhem Saurel committed
9
  )
10

Guilhem Saurel's avatar
Guilhem Saurel committed
11
12
ADD_LIBRARY(${PY_NAME} SHARED ${${PY_NAME}_BINDINGS_SOURCES})
SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES PREFIX "")
Wolfgang Merkt's avatar
Wolfgang Merkt committed
13
TARGET_COMPILE_OPTIONS(${PY_NAME} PRIVATE "-Wno-conversion")
Guilhem Saurel's avatar
Guilhem Saurel committed
14
PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} eigenpy)
15
16
17
IF(CURVES_WITH_PINOCCHIO_SUPPORT)
  PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} pinocchio)
ENDIF(CURVES_WITH_PINOCCHIO_SUPPORT)
18

19
TARGET_LINK_LIBRARIES(${PY_NAME} ${Boost_LIBRARIES})
Wolfgang Merkt's avatar
Wolfgang Merkt committed
20
# MESSAGE(WARNING "Boost libraries are : ${Boost_LIBRARIES}")
21

22
IF(APPLE)
23
24
  # We need to change the extension for python bindings
  SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES SUFFIX ".so")
25
26
ENDIF(APPLE)

27
28
29
30
31
32
33
34
35
INSTALL(TARGETS ${PY_NAME} DESTINATION ${PYTHON_SITELIB}/curves)

install (FILES plot/plot.py
  deploy/__init__.py
  DESTINATION ${PYTHON_SITELIB}/curves)
  
install (FILES deploy/optimization/__init__.py
  DESTINATION ${PYTHON_SITELIB}/curves/optimization)
  
Guilhem Saurel's avatar
Guilhem Saurel committed
36

37
ADD_PYTHON_UNIT_TEST("python-curves" "python/test/test.py" "python")
38
ADD_PYTHON_UNIT_TEST("python-optimization" "python/test/optimization.py" "python")