forked from VT-ASIM-LAB/ouster_lidar_driver_old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (33 loc) · 1.2 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
cmake_minimum_required(VERSION 3.1.0)
# ==== Project Name ====
project(ouster_viz)
# ==== Requirements ====
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)
find_package(Threads)
find_package(GLEW REQUIRED)
find_package(glfw3 CONFIG REQUIRED)
# ==== Libraries ====
# use only MPL-licensed parts of eigen
add_definitions(-DEIGEN_MPL2_ONLY)
add_library(ouster_viz src/point_viz.cpp src/cloud.cpp src/camera.cpp src/image.cpp
src/lidar_scan_viz.cpp)
target_link_libraries(ouster_viz
PUBLIC Threads::Threads glfw GLEW::GLEW OpenGL::GL
PRIVATE ouster_client)
target_include_directories(ouster_viz PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
add_library(OusterSDK::ouster_viz ALIAS ouster_viz)
# ==== Executables ====
add_executable(simple_viz src/simple_viz.cpp)
target_link_libraries(simple_viz ouster_client ouster_viz)
add_executable(OusterSDK::simple_viz ALIAS simple_viz)
# ==== Install ====
install(TARGETS ouster_viz simple_viz
EXPORT ouster-sdk-targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include)
install(DIRECTORY include/ouster DESTINATION include)