-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
89 lines (70 loc) · 2.11 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
cmake_minimum_required(VERSION 2.8.3)
project(scan3d_by_baxter)
# set ccache
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
set (CMAKE_CXX_FLAGS "-DPCL_ONLY_CORE_POINT_TYPES=ON -DNO_EXPLICIT_INSTANTIATIONS")
# compiler
set( CMAKE_BUILD_TYPE "Debug" )
set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
# Method 1: (Need to call "project(xxx)" before this line)
# set( EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin )
# set( LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib )
# Method 2:
# set( EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin )
# set( LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/lib )
# Method 3:
# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib)
# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib)
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin)
# pcl
find_package( PCL REQUIRED )
include_directories( ${PCL_INCLUDE_DIRS} )
add_definitions( ${PCL_DEFINITIONS} )
# Eigen
include_directories( "/usr/include/eigen3" ) # include eigen. Please modify this to the path on your computer
# OpenCV
find_package( OpenCV 4.0 REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
set( THIRD_PARTY_LIBS
${OpenCV_LIBS}
${PCL_LIBRARIES}
)
############### ROS ######################
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
sensor_msgs
geometry_msgs
message_generation
pcl_ros
)
add_message_files( # add my message
FILES
T4x4.msg
)
add_service_files(
FILES
PrintBaxterGripperPose.srv
PrintBaxterJointAngles.srv
)
generate_messages( # dependencies to my message
DEPENDENCIES
std_msgs
geometry_msgs
baxter_core_msgs
)
catkin_package(CATKIN_DEPENDS message_runtime) # declares dependencies for packages that depend on this package.
include_directories(
${catkin_INCLUDE_DIRS}
)
############### Sub directories ######################
include_directories( ${PROJECT_SOURCE_DIR}/include )
add_subdirectory( src_cpp )
add_subdirectory( test )
add_subdirectory( test_ros )
add_subdirectory( src_main )