Statistics
| Branch: | Tag: | Revision:

humotion / examples / humotion_yarp_icub / CMakeLists.txt @ a5cc61d4

History | View | Annotate | Download (1.748 KB)

1 6a2d467f Simon Schulz
PROJECT(humotion_yarp_icub)
2 8c6c1163 Simon Schulz
cmake_minimum_required(VERSION 2.8)
3
4
FIND_PACKAGE(YARP)
5
FIND_PACKAGE(ICUB)
6
FIND_PACKAGE(Boost REQUIRED COMPONENTS system thread)
7
FIND_PACKAGE(humotion)
8
9
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
10
11
# add include directories
12
INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS} ${ICUB_INCLUDE_DIRS} ${humotion_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} include/)
13
link_directories(${Boost_LIBRARY_DIRS} ${humotion_LIBRARY_DIRS})
14
15
# add required linker flags
16
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ICUB_LINK_FLAGS}")
17
SET(MAIN icub_humotion_server)
18
19
file(GLOB DUMMY_HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h)
20
21 0d0f5ca1 Simon Schulz
ADD_EXECUTABLE(${MAIN} src/main.cpp src/icub_jointinterface.cpp src/icub_faceinterface.cpp src/icub_data_receiver.cpp ${DUMMY_HEADER_LIST})
22 8c6c1163 Simon Schulz
23
# we now add the YARP and iCub libraries to our project.
24
TARGET_LINK_LIBRARIES(${MAIN} ${Boost_LIBRARIES} ${YARP_LIBRARIES} ${ICUB_LIBRARIES} ${humotion_LIBRARIES})
25
set_property(TARGET ${MAIN} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
26
27
INSTALL(TARGETS ${MAIN} DESTINATION bin)
28
29 6a2d467f Simon Schulz
30
#############
31
## style guide ##
32
#############
33
set(ENABLE_CPPLINT 1)
34
include(${CMAKE_CURRENT_SOURCE_DIR}/../../stylecheck/CpplintWrapper.cmake)
35
CPPLINT_RECURSIVE(cpplint_include
36
  ${CMAKE_CURRENT_SOURCE_DIR}/include
37
  ${CMAKE_CURRENT_SOURCE_DIR}/include
38
  ${CMAKE_CURRENT_BINARY_DIR}/include)
39
CPPLINT_RECURSIVE(cpplint_src
40
  ${CMAKE_CURRENT_SOURCE_DIR}/src
41
  ${CMAKE_CURRENT_SOURCE_DIR}/src
42
  ${CMAKE_CURRENT_BINARY_DIR}/src)
43
add_dependencies(${MAIN} cpplint_src cpplint_include)
44
45
#workaround for qtcreator ide integration. do not remove!
46
file(GLOB_RECURSE NODE_DUMMY_TARGETS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h *.cfg *.yaml *.xml *.launch)
47
add_custom_target(_dummy_target SOURCES ${NODE_DUMMY_TARGETS})