-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathCMakeLists.txt
39 lines (29 loc) · 923 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8.3)
SET(CMAKE_CXX_FLAGS "-std=c++11 -Wall -O3 -pthread")
project(tiny_slam)
set (rosv "rosversion")
set (rosv_dist "-d")
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
sensor_msgs
nav_msgs
tf
message_filters
)
catkin_package()
add_executable(tiny_slam src/tiny_slam/tiny_slam.cpp)
execute_process(COMMAND ${rosv} ${rosv_dist}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE ros_result
OUTPUT_VARIABLE ros_version)
if(${ros_version} STREQUAL "jade\n" OR (${ros_version} STREQUAL "indigo\n") )
target_link_libraries(tiny_slam ${catkin_LIBRARIES})
else()
if(CATKIN_ENABLE_TESTING)
find_package(GTest)
include_directories(${catkin_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS})
catkin_add_gtest(atest test/AutoExpandbleMap/AutoExpandble_map_utest.cpp)
target_link_libraries(tiny_slam ${catkin_LIBRARIES} ${GTEST_LIBRARY})
endif()
endif()