CMakeLists.txt 1.3 KB
Newer Older
Olivier Stasse's avatar
Olivier Stasse committed
1
2
3
4
5
6
# Copyright (C) 2017-2019 LAAS-CNRS
#
# Author: Olivier Stasse
#

ADD_EXECUTABLE(roscontrol_sot_hardware roscontrol_sot_hardware.cpp)
7
8
9
10
TARGET_INCLUDE_DIRECTORIES(roscontrol_sot_hardware PRIVATE
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
TARGET_LINK_LIBRARIES(roscontrol_sot_hardware ${PROJECT_NAME}
  ${catkin_LIBRARIES} ${bullet_libraries})
Olivier Stasse's avatar
Olivier Stasse committed
11
12

# Add the library to wrap the test device.
13
14
15
16
SET(DEVICE_NAME sot-test-device)
ADD_LIBRARY(${DEVICE_NAME} SHARED ${DEVICE_NAME}.cpp)
TARGET_LINK_LIBRARIES(${DEVICE_NAME} sot-core::sot-core)
INSTALL(TARGETS ${DEVICE_NAME} DESTINATION lib)
Olivier Stasse's avatar
Olivier Stasse committed
17

18
19
20
# build python submodule
STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${DEVICE_NAME})
SET(NEW_ENTITY_CLASS ${ENTITIES})
Olivier Stasse's avatar
Olivier Stasse committed
21

22
23
24
25
DYNAMIC_GRAPH_PYTHON_MODULE("sot/test/${PYTHON_LIBRARY_NAME}"
  ${DEVICE_NAME} sot-test-${PYTHON_LIBRARY_NAME}-wrap)
SET_TARGET_PROPERTIES(sot-test-${PYTHON_LIBRARY_NAME}-wrap PROPERTIES
  LIBRARY_OUTPUT_DIRECTORY ../src) # FIXME: weird catkin / dg interraction
Olivier Stasse's avatar
Olivier Stasse committed
26
27

# Add the library to wrap the controller of Test.
28
29
30
31
32
33
SET(CONTROLLER_NAME sot-test-controller)
ADD_LIBRARY(${CONTROLLER_NAME} SHARED sot-test-controller.cpp)
TARGET_INCLUDE_DIRECTORIES(${CONTROLLER_NAME} SYSTEM PUBLIC
  ${catkin_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${CONTROLLER_NAME} ${DEVICE_NAME})
INSTALL(TARGETS ${CONTROLLER_NAME} DESTINATION lib)