CMakeLists.txt 1.13 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
2
# Copyright (c) 2015-2020, CNRS
# Authors: Justin Carpentier <jcarpent@laas.fr>, Guilhem Saurel
Justin Carpentier's avatar
Justin Carpentier committed
3

Guilhem Saurel's avatar
Guilhem Saurel committed
4
5
6
7
8
9
10
SET(${PROJECT_NAME}_PYTHON_SOURCES
  module.cpp
  geometry/ellipsoid.cpp
  geometry/linear-cone.cpp
  geometry/second-order-cone.cpp
  scenario/contact-model.cpp
  scenario/contact-patch.cpp
11
  scenario/contact-phase.cpp
12
  scenario/contact-sequence.cpp
Guilhem Saurel's avatar
Guilhem Saurel committed
13
14
15
16
  scenario/enums.cpp
  )

ADD_LIBRARY(${PY_NAME} SHARED ${${PROJECT_NAME}_PYTHON_SOURCES} ${${PROJECT_NAME}_PYTHON_HEADERS})
Guilhem Saurel's avatar
Guilhem Saurel committed
17

Guilhem Saurel's avatar
Guilhem Saurel committed
18
ADD_SOURCE_GROUP(${PROJECT_NAME}_PYTHON_SOURCES)
Guilhem Saurel's avatar
Guilhem Saurel committed
19
20

TARGET_LINK_LIBRARIES(${PY_NAME} ${PROJECT_NAME} ${Boost_SERIALIZATION_LIBRARIES} eigenpy::eigenpy)
Guilhem Saurel's avatar
Guilhem Saurel committed
21
TARGET_LINK_BOOST_PYTHON(${PY_NAME})
Guilhem Saurel's avatar
Guilhem Saurel committed
22
23

SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PY_NAME} SOVERSION ${PROJECT_VERSION})
24
25
TARGET_COMPILE_OPTIONS(${PY_NAME} PRIVATE "-Wno-conversion")
TARGET_COMPILE_OPTIONS(${PY_NAME} PRIVATE "-Wno-enum-compare")
Guilhem Saurel's avatar
Guilhem Saurel committed
26
27
28

INSTALL(TARGETS ${PY_NAME} DESTINATION  ${${PY_NAME}_INSTALL_DIR})

Guilhem Saurel's avatar
Guilhem Saurel committed
29
30
31
32
33
34
35
SET(${PROJECT_NAME}_PYTHON_FILES
  __init__.py
  )

FOREACH(file ${${PROJECT_NAME}_PYTHON_FILES})
  PYTHON_INSTALL_ON_SITE(${PY_NAME} ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_FILES})