Revision ea068cf1 CMakeLists.txt
CMakeLists.txt | ||
---|---|---|
7 | 7 |
|
8 | 8 |
################################################################ |
9 | 9 |
# check for ROS support: |
10 |
find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs message_generation genmsg) |
|
10 |
find_package(catkin REQUIRED COMPONENTS |
|
11 |
roscpp |
|
12 |
std_msgs |
|
13 |
sensor_msgs |
|
14 |
message_generation |
|
15 |
genmsg |
|
16 |
dynamic_reconfigure |
|
17 |
) |
|
18 |
|
|
11 | 19 |
IF (NOT catkin_FOUND) |
12 | 20 |
MESSAGE(FATAL_ERROR "Error: could not find ROS middleware!") |
13 | 21 |
ENDIF (NOT catkin_FOUND) |
... | ... | |
57 | 65 |
humotion |
58 | 66 |
) |
59 | 67 |
|
68 |
# add dynamic reconfigure api |
|
69 |
generate_dynamic_reconfigure_options( |
|
70 |
cfg/humotion.cfg |
|
71 |
) |
|
60 | 72 |
|
61 | 73 |
# |
62 | 74 |
################################### |
... | ... | |
93 | 105 |
#link_directories (${Boost_LIBRARY_DIRS} ${REFLEXXES_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS}) |
94 | 106 |
|
95 | 107 |
## Declare a cpp library |
96 |
add_library(humotion
|
|
108 |
add_library(${PROJECT_NAME}
|
|
97 | 109 |
src/mouth_state.cpp |
98 | 110 |
src/gaze_state.cpp |
99 | 111 |
|
... | ... | |
123 | 135 |
|
124 | 136 |
## Add cmake target dependencies of the executable/library |
125 | 137 |
## as an example, message headers may need to be generated before nodes |
126 |
add_dependencies(humotion ${catkin_EXPORTED_TARGETS} humotion_gencpp)
|
|
138 |
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_gencpp ${PROJECT_NAME}_gencfg)
|
|
127 | 139 |
|
128 | 140 |
## Specify libraries to link a library or executable target against |
129 |
target_link_libraries(humotion
|
|
141 |
target_link_libraries(${PROJECT_NAME}
|
|
130 | 142 |
${Boost_LIBRARIES} |
131 | 143 |
${catkin_LIBRARIES} |
132 | 144 |
${REFLEXXES_LIBRARY} |
133 | 145 |
) |
134 | 146 |
|
135 |
set_property(TARGET humotion PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
147 |
set_property(TARGET ${PROJECT_NAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
136 | 148 |
|
137 | 149 |
############# |
138 | 150 |
## Install ## |
... | ... | |
149 | 161 |
# ) |
150 | 162 |
|
151 | 163 |
## Mark executables and/or libraries for installation |
152 |
install(TARGETS humotion
|
|
164 |
install(TARGETS ${PROJECT_NAME}
|
|
153 | 165 |
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
154 | 166 |
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
155 | 167 |
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
... | ... | |
197 | 209 |
${CMAKE_CURRENT_SOURCE_DIR}/src |
198 | 210 |
${CMAKE_CURRENT_SOURCE_DIR}/src |
199 | 211 |
${CMAKE_CURRENT_BINARY_DIR}/src) |
200 |
add_dependencies(humotion cpplint_src cpplint_include)
|
|
212 |
add_dependencies(${PROJECT_NAME} cpplint_src cpplint_include)
|
|
201 | 213 |
|
202 | 214 |
#workaround for qtcreator ide integration. do not remove! |
203 | 215 |
file(GLOB_RECURSE NODE_DUMMY_TARGETS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h *.cfg *.yaml *.xml *.launch) |
Also available in: Unified diff