forked from stereolabs/zed-ros-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
89 lines (73 loc) · 2.08 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
cmake_minimum_required(VERSION 2.8.7)
project(zed_wrapper)
###############################################################################
## Options
option( DEBUG_ACTIVE "Enable Debug build" ON )
if(DEBUG_ACTIVE)
MESSAGE( "Debug compilation active" )
set(ROS_BUILD_TYPE Debug)
set(CMAKE_BUILD_TYPE Debug)
else()
MESSAGE( "Release compilation active" )
set(ROS_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Release)
endif()
###############################################################################
IF(WIN32) # Windows
SET(ZED_INCLUDE_DIRS $ENV{ZED_INCLUDE_DIRS})
if (CMAKE_CL_64) # 64 bits
SET(ZED_LIBRARIES $ENV{ZED_LIBRARIES_64})
else(CMAKE_CL_64) # 32 bits
SET(ZED_LIBRARIES $ENV{ZED_LIBRARIES_32})
endif(CMAKE_CL_64)
SET(ZED_LIBRARY_DIR $ENV{ZED_LIBRARY_DIR})
SET(OPENCV_DIR $ENV{OPENCV_DIR})
ELSE() # Linux
find_package(ZED REQUIRED)
ENDIF(WIN32)
find_package(CUDA REQUIRED)
find_package(OpenCV REQUIRED)
find_package(catkin REQUIRED COMPONENTS
image_transport
roscpp
rosconsole
sensor_msgs
cv_bridge
)
catkin_package(
CATKIN_DEPENDS
roscpp
rosconsole
sensor_msgs
opencv2
cv_bridge
image_transport
)
###############################################################################
# INCLUDES
# Specify locations of header files.
include_directories(
${catkin_INCLUDE_DIRS}
${CUDA_INCLUDE_DIRS}
${ZED_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
link_directories(${ZED_LIBRARY_DIR})
link_directories(${CUDA_LIBRARY_DIRS})
link_directories(${OpenCV_LIBRARY_DIRS})
###############################################################################
###############################################################################
# EXECUTABLE
add_definitions(-std=c++11)# -m64) #-Wall)
add_executable(
zed_wrapper_node
src/zed_wrapper_node.cpp
)
target_link_libraries(
zed_wrapper_node
${catkin_LIBRARIES}
${ZED_LIBRARIES}
${CUDA_LIBRARIES} ${CUDA_nppi_LIBRARY} ${CUDA_npps_LIBRARY}
${OpenCV_LIBRARIES}
)
###############################################################################