Statistics
| Branch: | Tag: | Revision:

humotion / examples / meka / CMakeLists.txt @ e71325d1

History | View | Annotate | Download (1.862 KB)

1 473a6a6c Simon Schulz
PROJECT(meka_humotion_server)
2 2be6243f Sebastian Meyer zu Borgsen
cmake_minimum_required(VERSION 2.8)
3 39209d06 Sebastian Meyer zu Borgsen
SET(MAIN ${PROJECT_NAME})
4 473a6a6c Simon Schulz
5
set(ENV{ROS_LANG_DISABLE} "genjava")
6
set(ROS_BUILD_TYPE Debug)
7
8
################################################################
9
# check for ROS support:
10
find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs message_generation genmsg)
11
IF (catkin_FOUND)
12
    set(ROS_FOUND 1)
13
    message(STATUS "ROS Support is ON")
14
    add_definitions(-DROS_SUPPORT=1)
15
ENDIF (catkin_FOUND)
16
17
IF (NOT catkin_FOUND)
18
  message(FATAL_ERROR "Error: could not find ROS!")
19
ENDIF ()
20 2be6243f Sebastian Meyer zu Borgsen
21
FIND_PACKAGE(Boost REQUIRED COMPONENTS system thread)
22
FIND_PACKAGE(humotion)
23
24
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
25 473a6a6c Simon Schulz
#add_message_files(
26
#    FILES
27
#)
28
29
#generate_messages(
30
#    DEPENDENCIES
31
#    std_msgs
32
#)
33
34 39209d06 Sebastian Meyer zu Borgsen
#hack to allow sub dir calls work
35
36 473a6a6c Simon Schulz
catkin_package(
37
    INCLUDE_DIRS include
38
    LIBRARIES humotion
39
    #CATKIN_DEPENDS message_runtime
40
    #DEPENDS system_lib
41
)
42
43
include_directories( ${catkin_INCLUDE_DIRS})
44 2be6243f Sebastian Meyer zu Borgsen
45
# add include directories
46
INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS} ${ICUB_INCLUDE_DIRS} ${humotion_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} include/)
47
link_directories(${Boost_LIBRARY_DIRS} ${humotion_LIBRARY_DIRS})
48
49
# add required linker flags
50
51 473a6a6c Simon Schulz
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ICUB_LINK_FLAGS}")
52 2be6243f Sebastian Meyer zu Borgsen
file(GLOB DUMMY_HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h)
53
54 473a6a6c Simon Schulz
#add_dependencies(${MAIN} ${catkin_EXPORTED_TARGETS})
55
ADD_EXECUTABLE(${MAIN} src/main.cpp src/mekajointinterface.cpp ${DUMMY_HEADER_LIST})
56 2be6243f Sebastian Meyer zu Borgsen
57 473a6a6c Simon Schulz
TARGET_LINK_LIBRARIES(${MAIN} ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${humotion_LIBRARIES})
58 2be6243f Sebastian Meyer zu Borgsen
set_property(TARGET ${MAIN} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
59
60
61 473a6a6c Simon Schulz
#INSTALL(TARGETS ${MAIN} DESTINATION bin)
62
install(TARGETS ${MAIN}
63
    ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
64
    LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
65 f3a19545 Sebastian Meyer zu Borgsen
    RUNTIME DESTINATION bin 
66 473a6a6c Simon Schulz
)