CMakeLists.txt 1.62 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
# Copyright 2010 - 2019, Florent Lamiraux, Thomas Moulard, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
florent's avatar
florent committed
2

3
4
5
6
7
#
#
#  Python interpreter
#
#
8

9
SET(LIBRARY_NAME ${PROJECT_NAME})
10
ADD_LIBRARY(${LIBRARY_NAME} SHARED interpreter.cc)
11

12
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${PYTHON_LIBRARY})
Guilhem Saurel's avatar
Guilhem Saurel committed
13
TARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME})
14

15
IF(UNIX)
Guilhem Saurel's avatar
Guilhem Saurel committed
16
17
    TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES})
    TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${CMAKE_DL_LIBS})
18
ENDIF(UNIX)
19

20
21
22
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} dynamic-graph)

23
INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib)
24

florent's avatar
florent committed
25
26
27
28
29
30
#
#
#  Python bindings
#
#

31
ADD_SUBDIRECTORY(dynamic_graph)
florent's avatar
florent committed
32
33

SET (PYTHON_SOURCES
34
35
36
37
38
39
40
    __init__.py
    attrpath.py
    entity.py
    signal_base.py
    matlab.py
    script_shortcuts.py
    tools.py
Guilhem Saurel's avatar
Guilhem Saurel committed
41
    )
florent's avatar
florent committed
42
43

FOREACH (SOURCE ${PYTHON_SOURCES})
Guilhem Saurel's avatar
Guilhem Saurel committed
44
    PYTHON_INSTALL_ON_SITE(dynamic_graph ${SOURCE})
florent's avatar
florent committed
45
46
ENDFOREACH (SOURCE)

47
48
# --- ADD the wrap on the dg modules
# Tracer plugin
49
IF(WIN32)
Guilhem Saurel's avatar
Guilhem Saurel committed
50
    SET(TRACER_PLUGIN ${DYNAMIC_GRAPH_PLUGINDIR}/tracer${CMAKE_STATIC_LIBRARY_SUFFIX})
51
ELSE(WIN32)
Guilhem Saurel's avatar
Guilhem Saurel committed
52
    SET(TRACER_PLUGIN ${DYNAMIC_GRAPH_PLUGINDIR}/tracer${CMAKE_SHARED_LIBRARY_SUFFIX})
53
ENDIF(WIN32)
54
DYNAMIC_GRAPH_PYTHON_MODULE("tracer" ${TRACER_PLUGIN} tracer-wrap)
55
56

# TracerRealTime plugin
57
IF(WIN32)
Guilhem Saurel's avatar
Guilhem Saurel committed
58
    SET(TRACERREALTIME_PLUGIN ${DYNAMIC_GRAPH_PLUGINDIR}/tracer-real-time${CMAKE_STATIC_LIBRARY_SUFFIX})
59
ELSE(WIN32)
Guilhem Saurel's avatar
Guilhem Saurel committed
60
    SET(TRACERREALTIME_PLUGIN ${DYNAMIC_GRAPH_PLUGINDIR}/tracer-real-time${CMAKE_SHARED_LIBRARY_SUFFIX})
61
ENDIF(WIN32)
62
DYNAMIC_GRAPH_PYTHON_MODULE("tracer_real_time" ${TRACERREALTIME_PLUGIN} tracer_real_time-wrap)