forked from vvv-school/tutorial_yarp-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (25 loc) · 1.09 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
# requires minimum cmake version
cmake_minimum_required(VERSION 3.12)
# produce the cmake var PROJECT_NAME
project(tutorial_yarp-basics)
# mandatory use of these packages
find_package(ICUBcontrib REQUIRED)
find_package(YARP 3.4.0 REQUIRED os dev sig cv)
find_package(OpenCV REQUIRED)
# extend the current search path used by cmake to load helpers
list(APPEND CMAKE_MODULE_PATH ${ICUBCONTRIB_MODULE_PATH})
# helpers defining certain macros
include(ICUBcontribHelpers)
include(ICUBcontribOptions)
# specify to install in $ICUBcontrib_DIR/bin
icubcontrib_set_default_prefix()
# building module
include_directories(${CMAKE_SOURCE_DIR}/src)
# buulding server
add_executable(${PROJECT_NAME} src/main.cpp src/TutorialModule.h src/TutorialModule.cpp)
target_link_libraries(${PROJECT_NAME} ${YARP_LIBRARIES} ${OpenCV_LIBRARIES})
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
# generate ad-hoc project to perform "make uninstall"
icubcontrib_add_uninstall_target()
file(GLOB resources ${CMAKE_SOURCE_DIR}/resources/*)
yarp_install(FILES ${resources} DESTINATION ${ICUBCONTRIB_CONTEXTS_INSTALL_DIR}/${PROJECT_NAME})