-
Notifications
You must be signed in to change notification settings - Fork 39
/
CMakeLists.txt
78 lines (64 loc) · 1.94 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
cmake_minimum_required(VERSION 3.1)
project(gmsl_n_cameras)
set (CMAKE_CXX_STANDARD 11)
# FindDriveworks.cmake, ArchConfiguration.cmake, and LibFindMacros.cmake were needed for my setup they are taken from driveworks/samples/cmake/
# ArchConfiguration.cmake was the only file that needed small changes, remove the fatal error on line 17 and add the following lines in its place
set(VIBRANTE TRUE)
add_definitions(-DVIBRANTE)
# this is the path I placed the driveworks cmake files in
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(CUDA REQUIRED)
find_package(Threads REQUIRED)
find_package(GLEW REQUIRED)
find_package(Driveworks REQUIRED)
find_package(OpenCV REQUIRED )
# SET THESE VARIABLES TO YOUR DRIVEWORKS LOCATIONS
set(Driveworks_INCLUDE_DIR /usr/local/driveworks/include/)
set(Driveworks_LIBRARY /usr/local/driveworks/lib/)
find_package(catkin REQUIRED COMPONENTS
roscpp
geometry_msgs
cv_bridge
image_transport
)
catkin_package(
LIBRARIES ${PROJECT_NAME}
)
link_directories(
${Driveworks_LIBRARY})
MESSAGE("Driveworks include directory ${Driveworks_INCLUDE_DIR}")
include_directories(
${catkin_INCLUDE_DIRS}
${Driveworks_INCLUDE_DIR}
${CUDA_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/src
${GLEW_INCLUDE_DIR}
)
# TODO: add a FindNvmedia.cmake file for this? Why does it not exist?
include_directories(/usr/share/visionworks/sources/3rdparty/nvmedia/
/usr/share/visionworks/VisionWorks-1.6-Samples/3rdparty/glfw3/include/
)
# ros node name template
set(NODE_NAME ${PROJECT_NAME}_node)
add_executable(${NODE_NAME} src/main.cpp
src/ProgramArguments.cpp
src/ConsoleColor.cpp
src/WindowEGL.cpp
src/WindowGLFW.cpp
src/cv_connection.cpp
src/ResourceManager.cpp
src/SampleFramework.cpp
src/Camera.cpp
)
target_link_libraries(${NODE_NAME}
${catkin_LIBRARIES}
nvmedia
${GLEW_LIBRARY}
driveworks
GLESv2
EGL
drm
#glfw3
${CUDA_LIBRARY}
${OpenCV_LIBS}
)