-
Notifications
You must be signed in to change notification settings - Fork 47
/
CMakeLists.txt
74 lines (60 loc) · 1.42 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
cmake_minimum_required(VERSION 2.8.3)
project(visual_crop_row_navigation)
# c++11
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
find_package(catkin REQUIRED COMPONENTS
roscpp
genmsg
cmake_modules
message_generation
dynamic_reconfigure
std_msgs
cv_bridge
sensor_msgs
image_transport
)
find_package( PkgConfig )
find_package( OpenCV REQUIRED )
add_message_files(FILES vs_msg.msg)
generate_messages(DEPENDENCIES std_msgs)
set (CMAKE_CXX_STANDARD 11)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
pkg_check_modules( EIGEN3 REQUIRED eigen3 )
include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
${PROJECT_NAME}_core
CATKIN_DEPENDS
sensor_msgs
std_msgs
message_runtime
)
## Declare a cpp library
add_library(${PROJECT_NAME}_core
src/agribot_vs.cpp
)
## Declare cpp executables
add_executable(agribot_vs_node
src/agribot_vs_node.cpp
src/agribot_vs_nodehandler.cpp
)
target_link_libraries(agribot_vs_node
${PROJECT_NAME}_core
${catkin_LIBRARIES}
${OpenCV_LIBS}
Eigen3::Eigen
)
add_dependencies(agribot_vs_node ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_dependencies(${PROJECT_NAME}_core ${${PROJECT_NAME}_EXPORTED_TARGETS})