-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt~
93 lines (62 loc) · 2.35 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 2.8.3)
project(hotpot_slam)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "-std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "-std=c++0x")
else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
dynamic_reconfigure
std_msgs
image_transport
dynamic_reconfigure
sensor_msgs
tf
visualization_msgs
cv_bridge
pcl_conversions
pcl_ros
visualization_msgs
)
#find_package(OpenCV REQUIRED)
set(OpenCV_DIR "/home/rokid/projects/opencv3/build/")
find_package(OpenCV REQUIRED COMPONENTS core imgproc highgui)
find_package(Eigen3 3.1.0 REQUIRED)
find_package(PCL 1.7 REQUIRED )
##Needed for ros packages
catkin_package(CATKIN_DEPENDS roscpp rospy dynamic_reconfigure std_msgs image_transport dynamic_reconfigure sensor_msgs tf visualization_msgs cv_bridge pcl_conversions pcl_ros visualization_msgs)
include_directories(include
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${OpenCV_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/
${PROJECT_SOURCE_DIR}/Thirdparty/g2o/
${PROJECT_SOURCE_DIR}/Thirdparty/g2o/EXTERNAL/csparse/
)
link_directories(${PCL_LIBRARY_DIRS}
#${OpenCV_LIBS}
${EIGEN3_LIBS}
#${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so
#${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.so
${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/
${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/)
add_definitions(${PCL_DEFINITIONS})
###########
## Build ##
###########
###########my output
add_executable(hotpot_slam_node src/main.cc)
target_link_libraries(hotpot_slam_node ${OpenCV_LIBS} ${PCL_LIBRARIES} ${catkin_LIBRARIES} ${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so )
# add_executable(capture_img src/capture_img.cc)
# target_link_libraries(capture_img ${OpenCV_LIBS} ${PCL_LIBRARIES} ${catkin_LIBRARIES} ${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so )
# add_executable(orb_match_node src/orb_match.cc)
# target_link_libraries(orb_match_node ${OpenCV_LIBS} ${PCL_LIBRARIES} ${catkin_LIBRARIES} ${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so )
###########my output end