-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
61 lines (47 loc) · 1.25 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
cmake_minimum_required(VERSION 3.16)
project(oakd_ros)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++17")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -pthread")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(depthai CONFIG REQUIRED)
if(depthai_FOUND)
message(WARNING "depthai FOUND, Version:" ${depthai_VERSION} " directory: " ${depthai_DIR})
endif()
find_package(catkin REQUIRED COMPONENTS
roscpp
roslib
sensor_msgs
cv_bridge
pcl_conversions
pcl_ros
message_generation
message_runtime
)
find_package(OpenCV REQUIRED)
if(OPENCV_FOUND)
message(WARNING "OpenCV FOUND, Version:" ${OpenCV_VERSION} " directory: " ${OpenCV_INCLUDE_DIRS})
endif()
add_message_files(
FILES
bbox.msg
bboxes.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package()
###########
## Build ##
###########
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
add_executable(${PROJECT_NAME}_node src/main_ros.cpp)
target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} ${OpenCV_LIBS} depthai::core depthai::opencv)
add_executable(${PROJECT_NAME}_test src/test.cpp)
target_link_libraries(${PROJECT_NAME}_test ${catkin_LIBRARIES} ${OpenCV_LIBS} depthai::core depthai::opencv)