-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
54 lines (44 loc) · 2.14 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
# Copyright: (C) 2019 iCub Facility
# Author: Nicolo' Genesio <nicolo.genesio@iit.it>
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
cmake_minimum_required(VERSION 3.2.0)
set(PROJECT_NAME YarpViconBridge)
project(${PROJECT_NAME})
set (CMAKE_CXX_STANDARD 17)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(FeatureSummary)
find_package(YARP 3.3.2 REQUIRED
COMPONENTS os
sig
dev
math)
find_package(ViconSDK REQUIRED)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${ViconSDK_INCLUDE_DIR})
set(YARP_FORCE_DYNAMIC_PLUGINS TRUE CACHE INTERNAL "yarp_vicon is always built with dynamic plugins")
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
yarp_prepare_plugin(vicon
CATEGORY device
TYPE yarp::dev::YarpViconBridge
INCLUDE include/YarpViconBridge.h
DEFAULT ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
yarp_add_plugin(yarp_vicon include/YarpViconBridge.h
src/YarpViconBridge.cpp)
target_link_libraries(yarp_vicon PRIVATE YARP::YARP_os
YARP::YARP_sig
YARP::YARP_dev
YARP::YARP_math
${ViconSDK_LIBRARY})
list(APPEND YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS YARP::YARP_os
YARP::YARP_sig
YARP::YARP_dev
YARP::YARP_math
${ViconSDK_LIBRARY})
yarp_install(TARGETS yarp_vicon
EXPORT YARP_${YARP_PLUGIN_MASTER}
COMPONENT runtime
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR}
YARP_INI DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR}
)
set_property(TARGET yarp_vicon PROPERTY FOLDER "Plugins/Device")