humotion / examples / meka / CMakeLists.txt @ 16141bbf
History | View | Annotate | Download (1.861 KB)
1 | 473a6a6c | Simon Schulz | PROJECT(meka_humotion_server) |
---|---|---|---|
2 | 2be6243f | Sebastian Meyer zu Borgsen | cmake_minimum_required(VERSION 2.8) |
3 | 3504a859 | Simon Schulz | SET(MAIN meka_humotion_server) |
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 | catkin_package( |
||
35 | INCLUDE_DIRS include |
||
36 | LIBRARIES humotion |
||
37 | #CATKIN_DEPENDS message_runtime |
||
38 | #DEPENDS system_lib |
||
39 | ) |
||
40 | |||
41 | include_directories( ${catkin_INCLUDE_DIRS}) |
||
42 | 2be6243f | Sebastian Meyer zu Borgsen | |
43 | # add include directories |
||
44 | INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS} ${ICUB_INCLUDE_DIRS} ${humotion_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} include/) |
||
45 | link_directories(${Boost_LIBRARY_DIRS} ${humotion_LIBRARY_DIRS}) |
||
46 | |||
47 | # add required linker flags |
||
48 | |||
49 | 473a6a6c | Simon Schulz | SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ICUB_LINK_FLAGS}") |
50 | 2be6243f | Sebastian Meyer zu Borgsen | file(GLOB DUMMY_HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h) |
51 | |||
52 | 473a6a6c | Simon Schulz | #add_dependencies(${MAIN} ${catkin_EXPORTED_TARGETS}) |
53 | ADD_EXECUTABLE(${MAIN} src/main.cpp src/mekajointinterface.cpp ${DUMMY_HEADER_LIST}) |
||
54 | 2be6243f | Sebastian Meyer zu Borgsen | |
55 | 473a6a6c | Simon Schulz | TARGET_LINK_LIBRARIES(${MAIN} ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${humotion_LIBRARIES}) |
56 | 2be6243f | Sebastian Meyer zu Borgsen | set_property(TARGET ${MAIN} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) |
57 | |||
58 | |||
59 | 473a6a6c | Simon Schulz | #INSTALL(TARGETS ${MAIN} DESTINATION bin) |
60 | install(TARGETS ${MAIN} |
||
61 | ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
||
62 | LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
||
63 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
||
64 | ) |