forked from ros/catkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathros-config.buildspace.cmake.in
38 lines (28 loc) · 1.08 KB
/
ros-config.buildspace.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# set(ROS_ROOT @CMAKE_INSTALL_PREFIX@)
set(CMAKE_PREFIX_PATH @CMAKE_BINARY_DIR@:${CMAKE_PREFIX_PATH})
set(ROS_FOUND TRUE)
macro(list_push listname)
foreach(item ${ARGN})
list(FIND ${listname} ${item} _index)
if(_index EQUAL -1)
list(APPEND ${listname} ${item})
endif()
endforeach()
endmacro()
list_push(ROS_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
foreach(component ${ROS_FIND_COMPONENTS})
#EAR: not sure if it is necessary to pass paths here, as the prefix path should help with this?
find_package(${component} REQUIRED NO_MODULE
PATHS
@CMAKE_INSTALL_PREFIX@/share/${component}/cmake
)
if(NOT ${component}_FOUND)
message(FATAL_ERROR "Unable to find ROS component \"${component}\"")
endif()
list_push(ROS_INCLUDE_DIRS ${${component}_INCLUDE_DIRS})
list_push(ROS_LIBRARIES ${${component}_LIBRARIES})
# message("In ROS: ${${component}_LIBRARIES}")
# list(APPEND ROS_LIBRARIES ${${component}_LIBRARIES})
endforeach()
# message("${PROJECT_NAME} ROS_LIBRARIES: ${ROS_LIBRARIES}")
# message("${PROJECT_NAME} ROS_INCLUDE_DIRS: ${ROS_INCLUDE_DIRS}")