Revision b9e86b5d CMakeLists.txt

View differences:

CMakeLists.txt
40 40

  
41 41
################################################################
42 42
# check for ROS support:
43
find_package(catkin)
43
find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs message_generation genmsg)
44 44
IF (catkin_FOUND)
45
    SET(ROS_FOUND 1)
46

  
47
    find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs message_generation genmsg)
48

  
45
    set(ROS_FOUND 1)
49 46
    message(STATUS "ROS Support is ON")
50 47
    add_definitions(-DROS_SUPPORT=1)
51 48
ENDIF (catkin_FOUND)
......
64 61
  ENDIF ()
65 62
ENDIF()
66 63

  
67
IF (NOT catkin_FOUND)
68
    IF (NOT RSB_FOUND)
69
        message(FATAL_ERROR "Error: could neither find RSB or ROS middleware!")
70
    ENDIF (NOT RSB_FOUND)
71
ENDIF (NOT catkin_FOUND)
64
IF (NOT catkin_FOUND AND NOT RSB_FOUND)
65
  message(FATAL_ERROR "Error: could neither find RSB or ROS middleware!")
66
ENDIF ()
72 67

  
73 68

  
74 69
SET(REFLEXXES_LIBRARY_DIRS "${REFLEXXES_PREFIX}/lib")
......
128 123
include_directories( ${catkin_INCLUDE_DIRS})
129 124
link_directories (${Boost_LIBRARY_DIRS} ${REFLEXXES_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS})
130 125

  
131
file(GLOB DUMMY_HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h  include/client/*.h  include/server/*.h srv/*.srv msg/*.msg etc/*)
132

  
133 126
## Declare a cpp library
134 127
add_library(humotion
135 128
    src/mouth_state.cpp
......
157 150
    src/server/neck_motion_generator.cpp
158 151

  
159 152
    src/timestamped_list.cpp
160

  
161
    ${DUMMY_HEADER_LIST}
162 153
)
163 154

  
164 155
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
......
170 161

  
171 162
## Specify libraries to link a library or executable target against
172 163
target_link_libraries(humotion
173
			${Boost_LIBRARIES} 
164
			${Boost_LIBRARIES}
174 165
			${catkin_LIBRARIES}
175
                        ${REFLEXXES_LIBRARIES}
176
                        ${RST_LIBRARIES}
177
                        ${RSB_LIBRARIES}
166
			${REFLEXXES_LIBRARIES}
167
			${RST_LIBRARIES}
168
			${RSB_LIBRARIES}
178 169
)
179 170

  
180 171
set_property(TARGET humotion PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
......
201 192
        RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
202 193
    )
203 194
    ## Mark cpp header files for installation
204
    install(DIRECTORY include/
195
    install(DIRECTORY include
205 196
        DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
206
        PATTERN ".svn" EXCLUDE
207 197
    )
208 198
ENDIF (catkin_FOUND)
209 199

  

Also available in: Unified diff