CMakeLists.txt 1.53 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 dynamic_graph/python-compat.cc)
11

12
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${PYTHON_LIBRARY})
13

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

18
19
20
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} dynamic-graph)

21
INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib)
22

florent's avatar
florent committed
23
24
25
26
27
28
#
#
#  Python bindings
#
#

29
ADD_SUBDIRECTORY(dynamic_graph)
florent's avatar
florent committed
30
31

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

FOREACH (SOURCE ${PYTHON_SOURCES})
Guilhem Saurel's avatar
Guilhem Saurel committed
41
    PYTHON_INSTALL_ON_SITE(dynamic_graph ${SOURCE})
florent's avatar
florent committed
42
43
ENDFOREACH (SOURCE)

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

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