forked from robotology/yarp-devices-forcetorque
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (44 loc) · 2.33 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright: (C) 2016 Fondazione Istituto Italiano di Tecnologia
# Authors: Francesco Romano
# CopyPolicy: Released under the terms of the GNU LGPL v2.1+
# Compile the plugins by default
set(COMPILE_BY_DEFAULT ON)
YARP_PREPARE_PLUGIN(amtiplatforms TYPE yarp::dev::AMTIPlatformsDriver
INCLUDE AMTIPlatformsDriver.h
CATEGORY device)
if(ENABLE_amtiplatforms)
find_package(AMTIDriver REQUIRED)
if (CMAKE_VERSION VERSION_LESS "3.1")
set(CMAKE_CXX_FLAGS "--std=c++11 ${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_STANDARD 11)
endif()
include_directories(include)
include_directories(SYSTEM ${YARP_INCLUDE_DIRS})
yarp_add_plugin(amtiplatforms src/AMTIPlatformsDriver.cpp
src/AMTIlib.cpp
src/IMultipleForcePlates.cpp
include/AMTIPlatformsDriver.h
include/AMTIlib.h
include/IMultipleForcePlates.h)
target_link_libraries(amtiplatforms YARP::YARP_OS YARP::YARP_dev YARP::YARP_sig AMTI::USBDevice)
yarp_install(TARGETS amtiplatforms
COMPONENT runtime
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
yarp_install(FILES amtiplatforms.ini DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
YARP_PREPARE_PLUGIN(amtiforceplate TYPE yarp::dev::AMTIForcePlate
INCLUDE AMTIForcePlate.h
CATEGORY device
EXTRA_CONFIG WRAPPER=AnalogServer)
yarp_add_plugin(amtiforceplate src/IMultipleForcePlates.cpp
src/AMTIForcePlate.cpp
include/IMultipleForcePlates.h
include/AMTIForcePlate.h)
target_link_libraries(amtiforceplate YARP::YARP_OS YARP::YARP_dev YARP::YARP_sig)
yarp_install(TARGETS amtiforceplate
COMPONENT runtime
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
yarp_install(FILES amtiforceplate.ini DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
endif()