-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
96 lines (76 loc) · 4 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
89
90
91
92
93
94
95
96
cmake_minimum_required(VERSION 3.2)
project(pipelines)
find_package( OpenCV REQUIRED )
find_package(glfw3 REQUIRED)
find_package(GLEW REQUIRED)
find_package(OpenGL REQUIRED)
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED On)
set(CMAKE_CXX_EXTENSIONS Off)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast")
# <------------ add hiredis dependency --------------->
find_path(HIREDIS_HEADER hiredis)
find_library(HIREDIS_LIB hiredis)
# <------------ add redis-plus-plus dependency -------------->
# NOTE: this should be *sw* NOT *redis++*
find_path(REDIS_PLUS_PLUS_HEADER sw)
find_library(REDIS_PLUS_PLUS_LIB redis++)
set(IMGUI_DIR ${CMAKE_SOURCE_DIR}/external/imgui)
add_library(IMGUI STATIC)
target_include_directories( IMGUI
PUBLIC ${IMGUI_DIR}
PUBLIC ${IMGUI_DIR}/backends
PUBLIC ${IMGUI_DIR}/include
)
target_sources(IMGUI PRIVATE ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_tables.cpp ${IMGUI_DIR}/imgui_widgets.cpp ${IMGUI_DIR}/imgui.cpp
PRIVATE
${IMGUI_DIR}/backends/imgui_impl_opengl3.cpp
${IMGUI_DIR}/backends/imgui_impl_glfw.cpp
src/imconfig.cpp
)
include_directories( ${OpenCV_INCLUDE_DIRS} )
add_executable(PipeTest src/test.cpp)
target_link_libraries( PipeTest ${OpenCV_LIBS} OpenGL glfw IMGUI GLEW Eigen3::Eigen)
target_link_libraries(PipeTest ${HIREDIS_LIB})
target_link_libraries(PipeTest ${REDIS_PLUS_PLUS_LIB})
target_include_directories(PipeTest PUBLIC ${HIREDIS_HEADER})
target_include_directories(PipeTest PUBLIC ${REDIS_PLUS_PLUS_HEADER})
target_include_directories(PipeTest PRIVATE ${CMAKE_SOURCE_DIR}/include)
add_executable(MultiTest src/multi_file.cpp)
target_link_libraries( MultiTest ${OpenCV_LIBS} OpenGL glfw IMGUI GLEW Eigen3::Eigen)
target_link_libraries(MultiTest ${HIREDIS_LIB})
target_link_libraries(MultiTest ${REDIS_PLUS_PLUS_LIB})
target_include_directories(MultiTest PUBLIC ${HIREDIS_HEADER})
target_include_directories(MultiTest PUBLIC ${REDIS_PLUS_PLUS_HEADER})
target_include_directories(MultiTest PRIVATE ${CMAKE_SOURCE_DIR}/include)
add_executable(SingleTest src/single_cam.cpp)
target_link_libraries(SingleTest ${HIREDIS_LIB})
target_link_libraries(SingleTest ${REDIS_PLUS_PLUS_LIB})
target_include_directories(SingleTest PUBLIC ${HIREDIS_HEADER})
target_include_directories(SingleTest PUBLIC ${REDIS_PLUS_PLUS_HEADER})
target_link_libraries( SingleTest ${OpenCV_LIBS} OpenGL glfw IMGUI GLEW Eigen3::Eigen)
target_include_directories(SingleTest PRIVATE ${CMAKE_SOURCE_DIR}/include)
add_executable(RecorderTest src/stereo_record.cpp)
target_link_libraries( RecorderTest ${OpenCV_LIBS} OpenGL glfw IMGUI GLEW Eigen3::Eigen)
target_link_libraries(RecorderTest ${HIREDIS_LIB})
target_link_libraries(RecorderTest ${REDIS_PLUS_PLUS_LIB})
target_include_directories(RecorderTest PUBLIC ${HIREDIS_HEADER})
target_include_directories(RecorderTest PUBLIC ${REDIS_PLUS_PLUS_HEADER})
target_include_directories(RecorderTest PRIVATE ${CMAKE_SOURCE_DIR}/include)
add_executable(PosesTest src/poses.cpp)
target_link_libraries( PosesTest ${OpenCV_LIBS} OpenGL glfw IMGUI GLEW Eigen3::Eigen)
target_link_libraries(PosesTest ${HIREDIS_LIB})
target_link_libraries(PosesTest ${REDIS_PLUS_PLUS_LIB})
target_include_directories(PosesTest PUBLIC ${HIREDIS_HEADER})
target_include_directories(PosesTest PUBLIC ${REDIS_PLUS_PLUS_HEADER})
target_include_directories(PosesTest PRIVATE ${CMAKE_SOURCE_DIR}/include)
add_executable(IkService src/ik_service.cpp)
target_link_libraries( IkService ${OpenCV_LIBS} OpenGL glfw IMGUI GLEW Eigen3::Eigen)
target_link_libraries(IkService ${HIREDIS_LIB})
target_link_libraries(IkService ${REDIS_PLUS_PLUS_LIB})
target_include_directories(IkService PUBLIC ${HIREDIS_HEADER})
target_include_directories(IkService PUBLIC ${REDIS_PLUS_PLUS_HEADER})
target_include_directories(IkService PRIVATE ${CMAKE_SOURCE_DIR}/include)