-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
72 lines (59 loc) · 1.81 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
cmake_minimum_required(VERSION 2.8.3)
project(pirvs_ros)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
tf2_ros
image_transport
cv_bridge
camera_calibration_parsers
)
### 3rd party ###
# OpenCV
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
link_directories(${OpenCV_LIBS})
# LIBUSB
find_package(PkgConfig)
pkg_check_modules(LIBUSB libusb-1.0)
include_directories(${LIBUSB_INCLUDE_DIRS})
link_directories(${LIBUSB_LIBRARY_DIRS})
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK2 REQUIRED gtk+-2.0)
include_directories(${GTK2_INCLUDE_DIRS})
link_directories(${GTK2_INCLUDE_DIRS})
# Add other flags to the compiler
add_definitions(${GTK2_CFLAGS_OTHER})
set(EXT_LIBS
${LIBUSB_LIBRARIES}
${GTK2_LIBRARIES}
-lpthread
-lpng
-lz
-ldl
-fopenmp
-fPIC
-ljpeg
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES pirvs_ros
# CATKIN_DEPENDS roscpp rospy std_msgs
# DEPENDS system_lib
)
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
add_library(pirvs INTERFACE)
target_include_directories(pirvs INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/pirvs/include)
target_link_libraries(pirvs INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/pirvs/lib/libPerceptInPIRVS.a ${EXT_LIBS})
add_executable(stereo_camera_node src/stereo_camera_node.cpp)
target_link_libraries(stereo_camera_node ${catkin_LIBRARIES} pirvs)
add_executable(depth_camera_node src/depth_camera_node.cpp)
target_link_libraries(depth_camera_node ${catkin_LIBRARIES} pirvs)
add_executable(slam_node src/slam_node.cpp)
target_link_libraries(slam_node ${catkin_LIBRARIES} pirvs)