-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
40 lines (30 loc) · 1.63 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
# Copyright: (C) 2017 Universidad Carlos III de Madrid
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
if(NOT Leap_FOUND AND (NOT DEFINED ENABLE_LeapMotionSensor OR ENABLE_LeapMotionSensor))
message(WARNING "Leap package not found, disabling LeapMotionSensor")
endif()
yarp_prepare_plugin(LeapMotionSensor
CATEGORY device
TYPE roboticslab::LeapMotionSensor
INCLUDE LeapMotionSensor.hpp
DEFAULT ON
DEPENDS Leap_FOUND
EXTRA_CONFIG WRAPPER=analogServer)
if(NOT SKIP_LeapMotionSensor)
yarp_add_plugin(LeapMotionSensor LeapMotionSensor.hpp
DeviceDriverImpl.cpp
IAnalogSensorImpl.cpp
LogComponent.hpp
LogComponent.cpp)
target_link_libraries(LeapMotionSensor YARP::YARP_os
YARP::YARP_dev
YARP::YARP_sig
${Leap_LIBRARY})
target_include_directories(LeapMotionSensor PRIVATE ${Leap_INCLUDE_DIR})
yarp_install(TARGETS LeapMotionSensor
LIBRARY DESTINATION ${ROBOTICSLAB-YARP-DEVICES_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${ROBOTICSLAB-YARP-DEVICES_STATIC_PLUGINS_INSTALL_DIR}
YARP_INI DESTINATION ${ROBOTICSLAB-YARP-DEVICES_PLUGIN_MANIFESTS_INSTALL_DIR})
else()
set(ENABLE_LeapMotionSensor OFF CACHE BOOL "Enable/disable LeapMotionSensor device" FORCE)
endif()