Revision 473a6a6c examples/meka/CMakeLists.txt

View differences:

examples/meka/CMakeLists.txt
1
PROJECT(icub_humotion)
1
PROJECT(meka_humotion_server)
2 2
cmake_minimum_required(VERSION 2.8)
3
SET(MAIN maka_humotion_server)
4

  
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 ()
3 20

  
4 21
FIND_PACKAGE(Boost REQUIRED COMPONENTS system thread)
5 22
FIND_PACKAGE(humotion)
6 23

  
7 24
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
25
#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})
8 42

  
9 43
# add include directories
10 44
INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS} ${ICUB_INCLUDE_DIRS} ${humotion_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} include/)
11 45
link_directories(${Boost_LIBRARY_DIRS} ${humotion_LIBRARY_DIRS})
12 46

  
13 47
# add required linker flags
14
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ICUB_LINK_FLAGS}")
15
SET(MAIN icub_humotion_server)
16 48

  
49
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ICUB_LINK_FLAGS}")
17 50
file(GLOB DUMMY_HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h)
18 51

  
19
ADD_EXECUTABLE(${MAIN} src/main.cpp src/mekajointinterface.cpp src/meka_data_receiver.cpp ${DUMMY_HEADER_LIST})
52
#add_dependencies(${MAIN} ${catkin_EXPORTED_TARGETS})
53
ADD_EXECUTABLE(${MAIN} src/main.cpp src/mekajointinterface.cpp ${DUMMY_HEADER_LIST})
20 54

  
21
TARGET_LINK_LIBRARIES(${MAIN} ${Boost_LIBRARIES} ${humotion_LIBRARIES})
55
TARGET_LINK_LIBRARIES(${MAIN} ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${humotion_LIBRARIES})
22 56
set_property(TARGET ${MAIN} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
23 57

  
24 58

  
25
INSTALL(TARGETS ${MAIN} DESTINATION bin)
59
#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
)
26 65

  

Also available in: Unified diff